作者wfgh (lyle)
看板Python
标题[问题] not的用法
时间Sat Sep 8 22:56:32 2012
not 1 == False
#True
False == not 1
#SyntaxError: invalid syntax
根据下面的文件
http://docs.python.org/reference/expressions.html
precedence: not 高於 ==
为什麽第二种写法会出错呢?
谢谢:)
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 36.232.211.192
1F:→ vocaloid:from lowest to highest... 09/08 23:45
2F:→ wfgh:抱歉...我眼残了 09/08 23:57