why () is () and [] is [] work in other way?
Chris Angelico
rosuav at gmail.com
Sun Apr 22 16:06:33 EDT 2012
On Mon, Apr 23, 2012 at 5:43 AM, John Nagle <nagle at animats.com> wrote:
> Operator "is" should be be an error between immutables
> unless one is a built-in constant. ("True" and "False"
> should be made hard constants, like "None". You can't assign
> to None, but you can assign to True, usually with
> unwanted results. It's not clear why True and False
> weren't locked down when None was.)
Only in Python 2. In Python 3:
>>> True=3
SyntaxError: assignment to keyword
ChrisA
More information about the Python-list
mailing list