Re: [Python-Dev] Assignment to None

2008-06-09 Thread Terry Reedy
""Martin v. Löwis"" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |> At the global level, the subversion does not work: | | I think you are misinterpreting what you are seeing. No, you didn't understand the code I posted which explicitely demonstrated the same point you repeated.

Re: [Python-Dev] asyncore patch

2008-06-09 Thread Josiah Carlson
On Mon, Jun 9, 2008 at 7:19 PM, Benjamin Peterson <[EMAIL PROTECTED]> wrote: > On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED]> wrote: >> >> Would it be ok if I committed the changes? Neal, do you want to >> commit the changes if I post an updated patch with a blurb for the >> NE

Re: [Python-Dev] asyncore patch

2008-06-09 Thread Benjamin Peterson
On Mon, Jun 9, 2008 at 8:42 PM, Josiah Carlson <[EMAIL PROTECTED]> wrote: > > Would it be ok if I committed the changes? Neal, do you want to > commit the changes if I post an updated patch with a blurb for the > NEWS file? You are the asyncore maintainer, correct? I believe it's pretty much up t

[Python-Dev] asyncore patch

2008-06-09 Thread Josiah Carlson
As we approach the 2.6 beta date, and after getting my updated public key pushed to the python.org servers, I would really like to get the asyncore/asynchat patch (with documentation) committed. Previously, we were waiting on documentation, which the last patch had, but which was > 80 columns. Th

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Martin v. Löwis
> The question is, what is the specification for Python. Now, that's a more interesting question than the question originally asked (which I interpreted as "why does it work the way it works"). The only indication in the specification of that feature I could find was: http://docs.python.org/dev/

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Martin v. Löwis
> At the global level, the subversion does not work: I think you are misinterpreting what you are seeing. When you refer to the global identifier None, the compiler just knows that it must be the NoneType singleton, and returns it as a constant, without doing any name lookup. So it isn't that assi

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Terry Reedy
"Tony Nelson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] | At 4:46 PM +0100 6/9/08, Michael Foord wrote: | Or perhaps CPython should just stop trying to detect this at compile time. | Note that while assignment to ".None" is not allowed, setattr(foo, "None", | 1) then referenci

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Gisle Aas
On Jun 9, 2008, at 17:12, Alex Martelli wrote: The problem is more general: what if a member (of some external object we're proxying one way or another) is named print (in Python < 3), or class, or...? To allow foo.print or bar.class would require pretty big changes to Python's parser I simp

Re: [Python-Dev] Obtaining short file path

2008-06-09 Thread Trent Nelson
If you want a short path name, you should use win32api.GetShortPathName(). Attempting to compute it yourself isn’t as straight forward as you think. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Hartwell Bryan Sent: 27 May 2008 08:00 To: python-dev@python.org Subject: [Python-De

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Thomas Lee
Tony Nelson wrote: At 4:46 PM +0100 6/9/08, Michael Foord wrote: Alex Martelli wrote: The problem is more general: what if a member (of some external object we're proxying one way or another) is named print (in Python < 3), or class, or...? To allow foo.print or bar.class would requir

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Tony Nelson
At 4:46 PM +0100 6/9/08, Michael Foord wrote: >Alex Martelli wrote: >> The problem is more general: what if a member (of some external >> object we're proxying one way or another) is named print (in Python < >> 3), or class, or...? To allow foo.print or bar.class would require >> pretty big chang

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Michael Foord
Alex Martelli wrote: The problem is more general: what if a member (of some external object we're proxying one way or another) is named print (in Python < 3), or class, or...? To allow foo.print or bar.class would require pretty big changes to Python's parser -- I have vague memories that the i

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Alex Martelli
The problem is more general: what if a member (of some external object we're proxying one way or another) is named print (in Python < 3), or class, or...? To allow foo.print or bar.class would require pretty big changes to Python's parser -- I have vague memories that the issue was discussed ages

Re: [Python-Dev] Tuple pack/unpack and the definition of AST Assign nodes

2008-06-09 Thread Thomas Lee
Nick Coghlan wrote: I haven't looked at that code recently, but I believe the ADSL sequence in the assignment node is for statements where there are actually multiple assignment targets, such as: >>> p = x, y = 1, 2 >>> p, x, y ((1, 2), 1, 2) Cheers, Nick. Ah I see. A quick test verifies

Re: [Python-Dev] Tuple pack/unpack and the definition of AST Assign nodes

2008-06-09 Thread Nick Coghlan
Thomas Lee wrote: In porting one of the old peephole optimizations to the new AST compiler I noticed something weird going on with the following code: a, b, c = 1, 2, 3 Now, as you would expect this gets parsed into an Assign node. That Assign node looks like the following: Assign.targets =

[Python-Dev] Tuple pack/unpack and the definition of AST Assign nodes

2008-06-09 Thread Thomas Lee
In porting one of the old peephole optimizations to the new AST compiler I noticed something weird going on with the following code: a, b, c = 1, 2, 3 Now, as you would expect this gets parsed into an Assign node. That Assign node looks like the following: Assign.targets = [Tuple(Name(a), Na

Re: [Python-Dev] Nab those release blockers!

2008-06-09 Thread Benjamin Peterson
On Mon, Jun 9, 2008 at 5:33 AM, Jesse Noller <[EMAIL PROTECTED]> wrote: > For the multiprocessing module all I have left is the docs in rest format - > given I'm a rest newbie, it's taking longer than I thought If you want to email what you have done to [EMAIL PROTECTED], we'd love to help! --

Re: [Python-Dev] Nab those release blockers!

2008-06-09 Thread Nick Coghlan
Benjamin Peterson wrote: As we approach the planned first betas for 2.6/3.0, my heart sinks when I see the imposing list of 16 release blockers. [1] Luckily, most of the issues have patches that just need *your* review. Others, namely the Py3k exception issues, may require a little more discussio

Re: [Python-Dev] Nab those release blockers!

2008-06-09 Thread Jesse Noller
For the multiprocessing module all I have left is the docs in rest format - given I'm a rest newbie, it's taking longer than I thought On Jun 8, 2008, at 7:38 PM, "Benjamin Peterson" <[EMAIL PROTECTED] > wrote: As we approach the planned first betas for 2.6/3.0, my heart sinks when I see th

Re: [Python-Dev] [Python-3000] Stabilizing the C API of 2.6 and 3.0

2008-06-09 Thread M.-A. Lemburg
On 2008-06-09 07:20, Gregory P. Smith wrote: On Fri, Jun 6, 2008 at 2:19 AM, M.-A. Lemburg <[EMAIL PROTECTED]> wrote: On 2008-06-03 01:29, Gregory P. Smith wrote: On Mon, Jun 2, 2008 at 4:09 PM, Guido van Rossum <[EMAIL PROTECTED]> wrote: I will freely admit that I haven't followed this thr

Re: [Python-Dev] Assignment to None

2008-06-09 Thread Michael Foord
Steven D'Aprano wrote: On Mon, 9 Jun 2008 12:24:55 pm Curt Hagenlocher wrote: So, it's okay to setattr the attribute name "None" but not okay to set it directly? I suspect this is off-topic for python-dev, and would be better on comp.lang.python or similar, but for what it's worth,