Bug in New Style Classes
Yermat
loic at fejoz.net
Thu Jun 17 03:01:44 EDT 2004
Leif K-Brooks wrote:
> David MacQuigg wrote:
>
>> I have what looks like a bug trying to generate new style classes with
>> a factory function.
>
>
> IIRC, you can't assign to __bases__ of a new-style class. But you can
> use type() instead of your home-made factory function.
Even better:
see http://www.python.org/doc/current/lib/module-new.html and especially
classobj !
--
Yermat
More information about the Python-list
mailing list