Dan Sugalski <[EMAIL PROTECTED]> wrote: > At 11:27 AM +0200 9/3/04, Leopold Toetsch wrote: >>Dan Sugalski <[EMAIL PROTECTED]> wrote: >>> At 12:16 PM +0200 8/31/04, Leopold Toetsch wrote: >>>> >>>> Pclass = getclass, "Foo" >>>> Pobjnew = Pclass."__new"(args) # Pnew is an OUT argument >>>> >>>>and that be special-cased to call VTABLE_new according to calling >>>>conventions. >> >>> Still don't like __new, but otherwise that works out OK. It'd call >>> VTABLE_init_extended or whatever we'd name the entry. >> >>Ok. It is actually "new_extended" now. It's creating new objects, so >>"init_extended" didn't totally match the behaviou?r.
> Oh. This isn't right. The extended stuff's extended initialization, > just like init is now. It works on the PMC it's attached to, rather > than allocating a new PMC from the pool. I was always talking about a class method that returns new objects like in the example above. If we need extended initialization too, then that's a different set of opcode/vtable. The C<new_extended> matches nicely Python's object construction, like: c = complex(1,2) where "complex" actually is a class. leo