Re: [Python-Dev] nonlocal x = value

2010-12-27 Thread Raymond Hettinger
On Dec 25, 2010, at 2:59 AM, Stefan Behnel wrote: Hrvoje Niksic, 24.12.2010 09:45: On 12/23/2010 10:03 PM, Laurens Van Houtven wrote: On Thu, Dec 23, 2010 at 9:51 PM, Georg Brandl wrote: Yes and no -- there may not be an ambiguity to the parser, but still to the human. Except if you

Re: [Python-Dev] nonlocal x = value

2010-12-27 Thread Mark Dickinson
On Mon, Dec 27, 2010 at 9:43 AM, Raymond Hettinger raymond.hettin...@gmail.com wrote: FWIW, I'm entirely opposed to doing an assignment in a nonlocal definition. [...] -1 for assignment in nonlocal and global statements from me, too. Mark ___

Re: [Python-Dev] nonlocal x = value

2010-12-27 Thread Nick Coghlan
On Mon, Dec 27, 2010 at 8:31 PM, Mark Dickinson dicki...@gmail.com wrote: On Mon, Dec 27, 2010 at 9:43 AM, Raymond Hettinger raymond.hettin...@gmail.com wrote: FWIW, I'm entirely opposed to doing an assignment in a nonlocal definition. [...] -1 for assignment in nonlocal and global

Re: [Python-Dev] nonlocal x = value

2010-12-25 Thread Stefan Behnel
Hrvoje Niksic, 24.12.2010 09:45: On 12/23/2010 10:03 PM, Laurens Van Houtven wrote: On Thu, Dec 23, 2010 at 9:51 PM, Georg Brandl wrote: Yes and no -- there may not be an ambiguity to the parser, but still to the human. Except if you disallow the syntax in any case, requiring people to write

Re: [Python-Dev] nonlocal x = value

2010-12-24 Thread Hrvoje Niksic
On 12/23/2010 10:03 PM, Laurens Van Houtven wrote: On Thu, Dec 23, 2010 at 9:51 PM, Georg Brandlg.bra...@gmx.net wrote: Yes and no -- there may not be an ambiguity to the parser, but still to the human. Except if you disallow the syntax in any case, requiring people to write nonlocal x =

Re: [Python-Dev] nonlocal x = value

2010-12-23 Thread Georg Brandl
Am 22.12.2010 23:11, schrieb Laurens Van Houtven: On Sat, Dec 18, 2010 at 1:12 PM, Georg Brandl g.bra...@gmx.net wrote: Am 17.12.2010 17:52, schrieb Laurens Van Houtven: +1 for throwing it out of the PEP. Assignment is a thing, nonlocal/global is a thing, don't mix them up :) (That in addition

Re: [Python-Dev] nonlocal x = value

2010-12-23 Thread Laurens Van Houtven
On Thu, Dec 23, 2010 at 9:51 PM, Georg Brandl g.bra...@gmx.net wrote: Yes and no -- there may not be an ambiguity to the parser, but still to the human.  Except if you disallow the syntax in any case, requiring people to write nonlocal x = (3, y) which is then again inconsistent with

Re: [Python-Dev] nonlocal x = value

2010-12-23 Thread Georg Brandl
Am 23.12.2010 22:03, schrieb Laurens Van Houtven: On Thu, Dec 23, 2010 at 9:51 PM, Georg Brandl g.bra...@gmx.net wrote: Yes and no -- there may not be an ambiguity to the parser, but still to the human. Except if you disallow the syntax in any case, requiring people to write nonlocal x =

Re: [Python-Dev] nonlocal x = value

2010-12-22 Thread Laurens Van Houtven
On Sat, Dec 18, 2010 at 1:12 PM, Georg Brandl g.bra...@gmx.net wrote: Am 17.12.2010 17:52, schrieb Laurens Van Houtven: +1 for throwing it out of the PEP. Assignment is a thing, nonlocal/global is a thing, don't mix them up :) (That in addition to the grammar cleanliness argument Stephan

Re: [Python-Dev] nonlocal x = value

2010-12-22 Thread Terry Reedy
On 12/22/2010 5:11 PM, Laurens Van Houtven wrote: On Sat, Dec 18, 2010 at 1:12 PM, Georg Brandlg.bra...@gmx.net wrote: Am 17.12.2010 17:52, schrieb Laurens Van Houtven: +1 for throwing it out of the PEP. Assignment is a thing, nonlocal/global is a thing, don't mix them up :) (That in addition

Re: [Python-Dev] nonlocal x = value

2010-12-18 Thread Georg Brandl
Am 17.12.2010 17:52, schrieb Laurens Van Houtven: +1 for throwing it out of the PEP. Assignment is a thing, nonlocal/global is a thing, don't mix them up :) (That in addition to the grammar cleanliness argument Stephan already made) The trouble is what to make of nonlocal x = 3, y Is it two

Re: [Python-Dev] nonlocal x = value

2010-12-17 Thread Benjamin Peterson
2010/12/17 Stefan Behnel stefan...@behnel.de: Hi, it seems that Py3 doesn't support setting a nonlocal value as part of the nonlocal command    Python 3.2a4+ (py3k:86480, Nov 16 2010, 16:43:22)    [GCC 4.4.3] on linux2    Type help, copyright, credits or license for more information.    

Re: [Python-Dev] nonlocal x = value

2010-12-17 Thread Laurens Van Houtven
+1 for throwing it out of the PEP. Assignment is a thing, nonlocal/global is a thing, don't mix them up :) (That in addition to the grammar cleanliness argument Stephan already made) cheers lvh. ___ Python-Dev mailing list Python-Dev@python.org

Re: [Python-Dev] nonlocal x = value

2010-12-17 Thread Alexander Belopolsky
On Fri, Dec 17, 2010 at 11:52 AM, Laurens Van Houtven l...@laurensvh.be wrote: +1 for throwing it out of the PEP. Assignment is a thing, nonlocal/global is a thing, don't mix them up :) (That in addition to the grammar cleanliness argument Stephan already made) Another +1 for the same reasons.

Re: [Python-Dev] nonlocal x = value

2010-12-17 Thread Benjamin Peterson
2010/12/17 Alexander Belopolsky alexander.belopol...@gmail.com: On Fri, Dec 17, 2010 at 11:52 AM, Laurens Van Houtven l...@laurensvh.be wrote: +1 for throwing it out of the PEP. Assignment is a thing, nonlocal/global is a thing, don't mix them up :) (That in addition to the grammar

Re: [Python-Dev] nonlocal x = value

2010-12-17 Thread Alexander Belopolsky
On Fri, Dec 17, 2010 at 12:33 PM, Benjamin Peterson benja...@python.org wrote: .. Another +1 for the same reasons.  Also, since global does not allow assignment, neither should nonlocal. Note that the PEP stated that global would also be extended. I missed that, so for future reference, the