Python IDLE syntax coloring (highlighting) of print inconsistent?

荒凉一梦 提交于 2019-12-13 22:25:02

问题


Is Python IDLE consistent regarding syntax coloring (highlighting) of print?

I tested using IDLE 2.7.2. Sometimes it recognizes as a keyword. Sometimes as built-in ( such as list() or tuple() ). Both of them are, IMHO, correct; so IDLE is inconsistent?

Let me know your opinion.

KW

Added a screenshot 2012 04 01 18:27 KST (April fool's day but the shot is true.)

Link to my screenshot

How I made this:

  • Second print will be built-in from the beginning.
  • The last(=fourth) print is more tricky. First leave no blank line between the third and the fourth print. Then the fourth print is a keyword.
  • If I put insertion point (=cursor) at the end of the third print and press [Enter] key, the fourth print finally becomes a built-in.

Please let me know if I can have some more positive feedback now :)


回答1:


Without examples or screenshots there isn't really much we can do here, but if you really want great Syntax Highlighting and error detection I'd recommend using an IDE like PyCharm. It is not open source but it is the best Python IDE I've tried.




回答2:


This has been fixed: http://bugs.python.org/issue6528



来源:https://stackoverflow.com/questions/9903220/python-idle-syntax-coloring-highlighting-of-print-inconsistent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!