Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-15 Thread Guido van Rossum
On 3/15/07, Phillip J. Eby <[EMAIL PROTECTED]> wrote: > At 06:26 PM 3/14/2007 -0700, Guido van Rossum wrote: > >(It's a slightly > >different function than currently; the current function *returns* the > >locals, while the new one *takes* the locals as an argument; instead > >of a LOAD_LOCALS opcod

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-15 Thread Phillip J. Eby
At 06:26 PM 3/14/2007 -0700, Guido van Rossum wrote: >(It's a slightly >different function than currently; the current function *returns* the >locals, while the new one *takes* the locals as an argument; instead >of a LOAD_LOCALS opcode we need a STORE_LOCALS opcode.) Wouldn't it suffice to exec a

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-15 Thread Nicko van Someren
On 15 Mar 2007, at 04:33, Tony Lownds wrote: > Does **kwds need to be passed to prepare and also to metaclass > constructor? > Removing that would make it easier to provide nice error messages. > Custom __prepare__ > implementations can always store the **kwds that are needed in or > on the > d

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-14 Thread Greg Ewing
Guido van Rossum wrote: > So I think it would be acceptable to this into a call to a new > (hidden) built-in function, named __build_class__. > > > What do folks think? Looks good to me. It'll also provide some interesting new possibilities for overriding it in creative ways. :-) -- Greg __

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-14 Thread Tony Lownds
On Mar 14, 2007, at 6:26 PM, Guido van Rossum wrote: > The PEP proposes that the class statement accepts keyword arguments, > *args, and **kwds syntax as well as positional bases. This is a bit > messy to compile and execute, but we already have this, of course, in > the code for calling regular

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-14 Thread Steven Bethard
On 3/14/07, Robert Brewer <[EMAIL PROTECTED]> wrote: > Guido van Rossum wrote: > > The PEP proposes that the class statement accepts > > keyword arguments, *args, and **kwds syntax as well > > as positional bases. This is a bit messy to compile > > and execute, but we already have this, of cour

Re: [Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-14 Thread Robert Brewer
Guido van Rossum wrote: > The PEP proposes that the class statement accepts > keyword arguments, *args, and **kwds syntax as well > as positional bases. This is a bit messy to compile > and execute, but we already have this, of course, in > the code for calling regular functions. > > So I think it

[Python-3000] Compiling the PEP 3115 metaclass syntax

2007-03-14 Thread Guido van Rossum
The PEP proposes that the class statement accepts keyword arguments, *args, and **kwds syntax as well as positional bases. This is a bit messy to compile and execute, but we already have this, of course, in the code for calling regular functions. So I think it would be acceptable to this into a ca