[Python-3000] The p3yk branch

2006-12-12 Thread Thomas Wouters
There's a few more people working on the p3yk branch now, I think (or at least, there's been more work submitted than there used to :-), so I figure it's time to explain about the p3yk branch again. I think I already said most of these things once, anyway... it may have slipped my mind. Developme

Re: [Python-3000] Metaclasses in Py3K

2006-12-12 Thread Greg Ewing
Phillip J. Eby wrote: > At 11:07 AM 12/12/2006 -0800, Thomas Wouters wrote: > >>I do wonder why classes don't use fast locals, though. Probably because (a) class creation is rarely a speed bottleneck in any program, and (b) by using a dict you end up with it already in the right form for passing

Re: [Python-3000] Modules with Dual Python/C Implementations

2006-12-12 Thread Greg Ewing
Thomas Wouters wrote: > Except, of course, when the Python versions has features the C version > does not (thinking specifically of StringIO and unicode here.) Yes, I'm assuming the case where the Python and C versions are functionally equivalent. If not, then either the extra features of the Py

Re: [Python-3000] Switch/Case statement PEP

2006-12-12 Thread Greg Ewing
Marcin 'Qrczak' Kowalczyk wrote: > IMHO any expression should be acceptable, it should be evaluated when > being compared You'll have to be more precise about what you mean by "being compared". If you mean that the cases are to be tested one by one as in an if-else chain, there's little point in h

Re: [Python-3000] Metaclasses in Py3K

2006-12-12 Thread Phillip J. Eby
At 11:07 AM 12/12/2006 -0800, Thomas Wouters wrote: >I do wonder why classes don't use fast locals, though. Because fast locals were an optimization added for functions. Before that, there was no such thing as fast locals: everything used dictionaries. >Building the locals dict from the fast l

Re: [Python-3000] Metaclasses in Py3K

2006-12-12 Thread Thomas Wouters
On 12/12/06, Phillip J. Eby <[EMAIL PROTECTED]> wrote: At 10:11 AM 12/12/2006 -0800, Thomas Wouters wrote: >On 12/12/06, Jim Jewett ><[EMAIL PROTECTED]> wrote: >>On 12/8/06, Guido van Rossum <[EMAIL PROTECTED]> >>wrote: >> > I've been thinkin

Re: [Python-3000] Metaclasses in Py3K

2006-12-12 Thread Phillip J. Eby
At 10:11 AM 12/12/2006 -0800, Thomas Wouters wrote: >On 12/12/06, Jim Jewett ><[EMAIL PROTECTED]> wrote: >>On 12/8/06, Guido van Rossum <[EMAIL PROTECTED]> >>wrote: >> > I've been thinking about this too, and I think it's reasonable to let >>

Re: [Python-3000] Metaclasses in Py3K

2006-12-12 Thread Thomas Wouters
On 12/12/06, Jim Jewett <[EMAIL PROTECTED]> wrote: On 12/8/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > I've been thinking about this too, and I think it's reasonable to let > the metaclass provide the dict to be used as locals. I do wonder about this though: will it require a particular

Re: [Python-3000] Metaclasses in Py3K

2006-12-12 Thread Jim Jewett
On 12/8/06, Guido van Rossum <[EMAIL PROTECTED]> wrote: > I've been thinking about this too, and I think it's reasonable to let > the metaclass provide the dict to be used as locals. Is this something that could be done in 2.6, so long as the metaclass does happen to be set before the class statem

Re: [Python-3000] Python/C++ question

2006-12-12 Thread Giovanni Bajo
Martin v. Löwis wrote: >> To me, the killer feature would be that in C++ you can implement a smart >> pointer which takes care of incref/decref automatically for 99% of the code. >> This would be a terrific tool for the extension/core writers. > > Of course, this would also break in presence of

Re: [Python-3000] Modules with Dual Python/C Implementations

2006-12-12 Thread Ronald Oussoren
On Dec 11, 2006, at 9:10 PM, Brett Cannon wrote: On 12/10/06, Calvin Spealman <[EMAIL PROTECTED]> wrote: Has anyone considered consolidating the module pairs that have both a C and Python implementation? For example, pickle and cPickle and StingIO and cStringIO. It seems like keeping both aro