Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #52916

Re: Setting the value of True

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <gary.herron@islandtraining.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'assign': 0.07; 'assignment': 0.07; 'fixes': 0.07; 'python3': 0.07; 'builtin': 0.09; 'received:67.192': 0.09; 'received:67.192.241': 0.09; 'received:dfw.emailsrvr.com': 0.09; 'python': 0.11; 'assignments.': 0.16; 'exception:': 0.16; 'syntaxerror:': 0.16; 'wrote:': 0.18; 'header:User-Agent:1': 0.23; 'received:emailsrvr.com': 0.24; 'received:(smtp server)': 0.26; 'header:In-Reply-To:1': 0.27; 'raise': 0.29; '"",': 0.31; '1.3': 0.31; '>>>>': 0.31; 'names.': 0.31; 'allows': 0.31; 'file': 0.32; 'subject:the': 0.34; 'but': 0.35; 'consistent': 0.36; 'keyword': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'email addr:gmail.com': 0.63; 'such': 0.63; 'subject:True': 0.91; 'subject:Setting': 0.96
X-Virus-Scanned OK
Date Fri, 23 Aug 2013 16:48:33 -0700
From Gary Herron <gary.herron@islandtraining.com>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8
MIME-Version 1.0
To python-list@python.org
Subject Re: Setting the value of True
References <9da851be-9ab3-4984-8f3e-71582f8ff4da@googlegroups.com>
In-Reply-To <9da851be-9ab3-4984-8f3e-71582f8ff4da@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.183.1377302041.19984.python-list@python.org> (permalink)
Lines 19
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1377302041 news.xs4all.nl 15920 [2001:888:2000:d::a6]:45494
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:52916

Show key headers only | View raw


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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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