Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #52916
| Date | 2013-08-23 16:48 -0700 |
|---|---|
| From | Gary Herron <gary.herron@islandtraining.com> |
| Subject | Re: Setting the value of True |
| References | <9da851be-9ab3-4984-8f3e-71582f8ff4da@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.183.1377302041.19984.python-list@python.org> (permalink) |
On 08/23/2013 04:38 PM, jeangawron@gmail.com wrote:
> Python allows you set the value of True
>
>>>> True = 1.3
> Now this is consistent with the decision to let you set the
> value of various builtin names. But why is this case different:
>
>>>> None = 1.3
> File "<stdin>", line 1
> SyntaxError: cannot assign to None
>
> Mark Gawron
Python3 fixes this inconsistency, by disallowing all such assignments.
They all raise an exception:
SyntaxError: assignment to keyword
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Setting the value of True jeangawron@gmail.com - 2013-08-23 16:38 -0700
Re: Setting the value of True Gary Herron <gary.herron@islandtraining.com> - 2013-08-23 16:48 -0700
Re: Setting the value of True Terry Reedy <tjreedy@udel.edu> - 2013-08-23 19:56 -0400
Re: Setting the value of True Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-08-24 01:14 +0000
Re: Setting the value of True Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2013-08-25 13:27 +1200
csiph-web