Re: [Python-3000] PEP: Supporting Non-ASCII Identifiers

2007-05-04 Thread James Y Knight
On May 4, 2007, at 4:47 PM, Baptiste Carvello wrote: > If this is to ever happen, it should be only accessible through a > command-line > option to python. That way we make sure people are aware that they > are making > their code incompatible with the larger world. That's ridiculous. Without

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Greg Ewing
Raymond Hettinger wrote: > Can I please press the button for a few days until I can offer > a useful starting point. Before you go any further, the important thing to take from the thread so far is that you mustn't keep the whole contents of the object's __dict__ alive via the callback. -- Gre

Re: [Python-3000] PEP 3132: Extended Iterable Unpacking

2007-05-04 Thread Daniel Stutzbach
On 5/4/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > I don't think that returning the type given is a goal > that should be attempted, because it can only ever work > for a fixed set of known types. Given an arbitrary > sequence type, there is no way of knowing how to > create a new instance of it wi

Re: [Python-3000] PEP 3132: Extended Iterable Unpacking

2007-05-04 Thread Greg Ewing
Simon Percivall wrote: > This was more in the way of returning the type that was given: > if you start with a list you end up with a list in "b", if you > start with an iterator you end up with an iterator. I don't think that returning the type given is a goal that should be attempted, because it

[Python-3000] Can someone please make py3k* checkins go to the python-3000-checkins mailing list?

2007-05-04 Thread Guido van Rossum
I don't know how the filters for checkin emails are set up, but this seems wrong: mail related to the p3yk branch goes to python-3000-checkins, but mail related to the py3k-unistr branch goes to python-checkins. There are a bunch of branches of relevance to py3k now; these should all go to the pyth

Re: [Python-3000] PEP: Supporting Non-ASCII Identifiers

2007-05-04 Thread Martin v. Löwis
> If this is to ever happen, it should be only accessible through a command-line > option to python. That way we make sure people are aware that they are making > their code incompatible with the larger world. In what way will the source code be incompatible with the larger world? Martin

Re: [Python-3000] [Python-Dev] updated PEP3125, Remove Backslash Continuation

2007-05-04 Thread Neville Grech Neville Grech
This PEP is much more reasonable. Should ``\``-continuation be removed even inside strings? -1 Backslash continuation in strings is used a lot.. especially in strings that must not start with a newline but are written in the following format for clarity: '''\ first line second line\ ''' Shoul

Re: [Python-3000] PEP: Supporting Non-ASCII Identifiers

2007-05-04 Thread Baptiste Carvello
Martin v. Löwis a écrit : > PEP: 31xx > Title: Supporting Non-ASCII Identifiers > Version: $Revision$ > Last-Modified: $Date$ > Author: Martin v. Löwis <[EMAIL PROTECTED]> > Status: Draft > Type: Standards Track > Content-Type: text/x-rst > Created: 1-May-2007 > Python-Version: 3.0 > Post-History:

Re: [Python-3000] [Python-Dev] PEP 30XZ: Simplified Parsing

2007-05-04 Thread Mike Klaas
On 5/4/07, Baptiste Carvello <[EMAIL PROTECTED]> wrote: > maybe we could have a "dedent" literal that would remove the first newline and > all indentation so that you can just write: > > call_something( d''' > first part > second line > third line

Re: [Python-3000] [Python-Dev] updated PEP3125, Remove Backslash Continuation

2007-05-04 Thread Steven Bethard
[cc -python-dev] On 5/4/07, Jim Jewett <[EMAIL PROTECTED]> wrote: > Open Issues > === > > + Should ``\``-continuation be removed even inside strings? I'm a strong -1 on this PEP if ``\``-continuation is removed from inside triple-quoted strings. I'd hate to have to go from writing::

[Python-3000] updated PEP3125, Remove Backslash Continuation

2007-05-04 Thread Jim Jewett
Major rewrite. The inside-a-string continuation is separated from the general continuation. The alternatives section is expaned to als list Andrew Koenig's improved inside-expressions variant, since that is a real contender. If anyone feels I haven't acknowledged their concerns, please tell me.

Re: [Python-3000] PEP 30XZ: Simplified Parsing

2007-05-04 Thread Steve Holden
Michael Foord wrote: > Jim Jewett wrote: >> PEP: 30xz >> Title: Simplified Parsing >> Version: $Revision$ >> Last-Modified: $Date$ >> Author: Jim J. Jewett <[EMAIL PROTECTED]> >> Status: Draft >> Type: Standards Track >> Content-Type: text/plain >> Created: 29-Apr-2007 >> Post-History: 29-Apr-2007

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Raymond Hettinger
> If it really has to be done this way, I think the whole PEP is doomed. This thread is getting way ahead of me and starting to self-destruct before I've had a chance to put together a concrete proposal and scan existing code for use cases. Can I please press the button for a few days until I

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Adam Olsen
On 5/4/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 5/4/07, Steven Bethard <[EMAIL PROTECTED]> wrote: > > On 5/4/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > > Hm, a thought just occurred to me. Why not arrange for object.__new__ > > > to call [the moral equivalent of] weakref.cleanu

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Guido van Rossum
On 5/4/07, Steven Bethard <[EMAIL PROTECTED]> wrote: > On 5/4/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > On 5/4/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > > An encapsulating function should be added to the weakref module > > > so that Guido's example could be written as: > > > >

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Steven Bethard
On 5/4/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 5/4/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > > An encapsulating function should be added to the weakref module > > so that Guido's example could be written as: > > > > class BufferedWriter: > > > > def __init__(self, raw): > >

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Guido van Rossum
On 5/4/07, Raymond Hettinger <[EMAIL PROTECTED]> wrote: > An encapsulating function should be added to the weakref module > so that Guido's example could be written as: > > class BufferedWriter: > > def __init__(self, raw): > self.raw = raw > self.buffer = "" > weakref.cleanup(self, l

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Michael Bayer
On May 4, 2007, at 10:33 AM, Giovanni Bajo wrote: > On 5/4/2007 4:21 PM, Michael Bayer wrote: > >>> >> why not encapsulate the "proper" weakref-based approach in an easy- >> to-use method such as "__close__()" ? that way nobody has to >> guess how to follow this pattern. > > Because the idea

Re: [Python-3000] PEP 3132: Extended Iterable Unpacking

2007-05-04 Thread Steven Bethard
On 5/3/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Steven Bethard wrote: > > > This brings up the question of why the patch produces lists, not > > tuples. What's the reasoning behind that? > > When dealing with an iterator, you don't know the > length in advance, so the only way to get a tuple > w

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Raymond Hettinger
[Michael Bayer] > why not encapsulate the "proper" weakref-based approach in an easy-to- > use method such as "__close__()" ? that way nobody has to guess how > to follow this pattern. An encapsulating function should be added to the weakref module so that Guido's example could be written as:

Re: [Python-3000] PEP: Eliminate __del__

2007-05-04 Thread Michael Bayer
On May 4, 2007, at 1:12 AM, Raymond Hettinger wrote: > From: "Greg Ewing" <[EMAIL PROTECTED]> >> It has nothing to do with cyclic GC. The point is that >> if the refcount of a weak reference drops to zero before >> that of the object being weakly referenced, the weak >> reference object itself is

Re: [Python-3000] PEP 3132: Extended Iterable Unpacking

2007-05-04 Thread Simon Percivall
On 4 maj 2007, at 06.13, Greg Ewing wrote: > Simon Percivall wrote: >> if the proposal is constrained to only allowing the *name at >> the end, wouldn't a more useful behavior be to not exhaust the >> iterator, making it similar to: >> > it = iter(range(10)) >> > a = next(it) >> > b = it >> or w