Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-12 Thread Nick Coghlan
Greg Ewing wrote: > Phillip J. Eby wrote: >> you can register your types with other people's >> generic functions, or other people's types with your generic >> functions, > > There's still a possibility of conflict even then. Fred > registers one of Mary's types with his generic function, > whic

[Python-3000] Revised PEP 3119 (Abstract Base Classes)

2007-05-12 Thread Guido van Rossum
Here's a new version of the ABC PEP. A lot has changed; a lot remains. I can't give a detailed overview of all the changes, and a diff would show too many spurious changes, but some of the highlights are: - Overloading isinstance and issubclass is now a key mechanism rather than an afterthought; i

[Python-3000] Support for PEP 3131

2007-05-12 Thread Guillaume Proux
Dear all, Pleased to meet you. I just subscribed to the list because I wanted to join the discussion regarding a specific PEP (for all the rest, you are all much more expert than me) Guido: > 3131 (non-ASCII identifiers) -- I'm leaning towards rejecting. I would like to voice my opposition to th

Re: [Python-3000] PEP: Eliminate __del__

2007-05-12 Thread Steven Bethard
On 5/7/07, Antoine Pitrou <[EMAIL PROTECTED]> wrote: > FWIW and in light of the thread on removing __del__ from the language, I > just posted Yet Another Recipe for automatic finalization: > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/519621 > > It allows writing a finalizer as a single

Re: [Python-3000] ABC's, Roles, etc

2007-05-12 Thread Jeff Shell
On 5/10/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 09:06 AM 5/10/2007 -0400, Benji York wrote: > >I would let Jim speak for himself too, but I prefer to put words in his > >mouth. ;) While zope.interface has anemic facilities for "verifying" > >interfaces, few people use them, and even the

Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-12 Thread Phillip J. Eby
At 01:43 PM 5/12/2007 +1200, Greg Ewing wrote: >Phillip J. Eby wrote: > > At 01:27 PM 5/11/2007 -0400, Jim Jewett wrote: > >>If there are two registrations for the same selection criteria, how > >>can the user resolve things? > >But what if there's *already* an @around method being >used? Then you

Re: [Python-3000] Support for PEP 3131

2007-05-12 Thread Stargaming
Guillaume Proux schrieb: > Dear all, > [snip] > > In this respect, I strongly believe that support non-ASCII identifiers > as proposed by PEP3131 would improve a number of things: > - discussion and uptake of python in "non-ascii" countries While still separating them from ascii-countries. They

Re: [Python-3000] ABC's, Roles, etc

2007-05-12 Thread Phillip J. Eby
At 11:58 AM 5/12/2007 -0600, Jeff Shell wrote: >Actually, I don't know what LBYL and EFTP (or whatever that other one >is) mean in this context. This is the first time I've heard, or at >least paid attention to, those acronyms. In this context anyways. > >If you could explain what this really means

Re: [Python-3000] PEP: Eliminate __del__

2007-05-12 Thread Guido van Rossum
On 5/12/07, Steven Bethard <[EMAIL PROTECTED]> wrote: > And here's a version that doesn't lose updates to the finalizer attributes: > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/519635 > > It replaces enable_finalizer() with a class attribute __finalattrs__. > >From __finalize__,

Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-12 Thread Jim Jewett
On 5/12/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 01:43 PM 5/12/2007 +1200, Greg Ewing wrote: > In practice, @around is mostly used for application-defined special > cases, and there is no higher authority than the application who > needs to override things. If a library needs special co

Re: [Python-3000] Revised PEP 3119 (Abstract Base Classes)

2007-05-12 Thread Talin
Guido van Rossum wrote: > Here's a new version of the ABC PEP. A lot has changed; a lot remains. > I can't give a detailed overview of all the changes, and a diff would > show too many spurious changes, but some of the highlights are: Some general comments on the PEP: Compared to the previous ver

Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-12 Thread Talin
Jim Jewett wrote: > On 5/12/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: >> At 01:43 PM 5/12/2007 +1200, Greg Ewing wrote: > >> In practice, @around is mostly used for application-defined special >> cases, and there is no higher authority than the application who >> needs to override things. If

Re: [Python-3000] ABC's, Roles, etc

2007-05-12 Thread Guido van Rossum
On 5/12/07, Jeff Shell <[EMAIL PROTECTED]> wrote: > I like that the interface hierarchy is different than an > implementation hierarchy. I like that it's easier to test for > interface provision than it is to use isinstance() - > `IFoo.providedBy(obj)` often works regardless of whether 'obj' is a >

Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-12 Thread Phillip J. Eby
At 03:03 PM 5/12/2007 -0400, Jim Jewett wrote: >On 5/12/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: >>At 01:43 PM 5/12/2007 +1200, Greg Ewing wrote: > >>In practice, @around is mostly used for application-defined special >>cases, and there is no higher authority than the application who >>needs t

Re: [Python-3000] PEP: Eliminate __del__

2007-05-12 Thread Steven Bethard
On 5/12/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > On 5/12/07, Steven Bethard <[EMAIL PROTECTED]> wrote: > > And here's a version that doesn't lose updates to the finalizer attributes: > > > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/519635 > > > > It replaces enable_final

Re: [Python-3000] PEP 3124 - Overloading, Generic Functions, Interfaces, etc.

2007-05-12 Thread Guido van Rossum
On 5/12/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > The emerging consensus appears to be that everything relating to > method combination and Aspects should be a second PEP, [...] Yes, please. I've just finished reading linearly through the version of PEP 3124 that's currently online, and the

Re: [Python-3000] ABC's, Roles, etc

2007-05-12 Thread Greg Ewing
Guido van Rossum wrote: > From this point, issubclass(InstrumentedList, Sequence) will be true > (and likewise for instances of it and isinstance(x, Sequence)). But > InstrumentedList's __mro__ and __bases__ are unchanged. I think I've figured out what bothers me about this kind of overloading of

Re: [Python-3000] PEP: Eliminate __del__

2007-05-12 Thread Greg Ewing
Steven Bethard wrote: > Yep. The 'self' passed to __finalize__ is still an instance of the > same class (e.g. BufferedWriter or MyWriter). So inheritance works > normally: However, if the overridden method uses any attributes not mentioned in the original __finalattrs__, they will need to be adde

Re: [Python-3000] PEP: Eliminate __del__

2007-05-12 Thread Steven Bethard
On 5/12/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Steven Bethard wrote: > > > Yep. The 'self' passed to __finalize__ is still an instance of the > > same class (e.g. BufferedWriter or MyWriter). So inheritance works > > normally: > > However, if the overridden method uses any attributes > not men

Re: [Python-3000] Support for PEP 3131

2007-05-12 Thread Guillaume Proux
Dear Stargaming, On 5/13/07, Stargaming <[EMAIL PROTECTED]> wrote: > Guillaume Proux schrieb: I see that the language you are most comfortable with is German. Compared with French (and even more with Japanese), I have a bias that German people are very gifted in foreign languages and especially i

Re: [Python-3000] ABC's, Roles, etc

2007-05-12 Thread Guido van Rossum
On 5/12/07, Greg Ewing <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > > From this point, issubclass(InstrumentedList, Sequence) will be true > > (and likewise for instances of it and isinstance(x, Sequence)). But > > InstrumentedList's __mro__ and __bases__ are unchanged. > > I think I've

Re: [Python-3000] PEP: Eliminate __del__

2007-05-12 Thread Greg Ewing
Steven Bethard wrote: > You already don't need to list the attributes from the base classes. > The __finalattrs__ are converted into class level descriptors, so if > class D inherits from class C, it has the __finalattrs__ descriptors > for both classes. That's fine, then. -- Greg __

Re: [Python-3000] Support for PEP 3131

2007-05-12 Thread Talin
Guillaume Proux wrote: > Dear all, > > Pleased to meet you. I just subscribed to the list because I wanted to > join the discussion regarding a specific PEP (for all the rest, you > are all much more expert than me) > > Guido: >> 3131 (non-ASCII identifiers) -- I'm leaning towards rejecting. > >