Re: [Python-Dev] metaclass insanity

Guido van Rossum <guido@python.org> writes:
OK. I can crib code from type_set_class, I guess. Or one could just allow assignment to __bases__ when __base__ doesn't change? __base__ is object for the majority of new-style classes, isn't it? Brr. There's a lot I don't know about post 2.2 typeobject.c.
Don't see the point of that.
But it's fine if it's not writable.
Easier :)
It's a bit more complicated than that. What's the deal wrt. dots in tp_name? Is there any way for a user defined class to end up called "something.somthing_else"? Oh, and while we're at it, here's a bogosity:
caused by lax testing in type_set_module.
Well, I didn't get it finished either. Fiddly, this stuff. Maybe by tomorrow. Cheers, M. -- The Internet is full. Go away. -- http://www.disobey.com/devilshat/ds011101.htm

But if you derive from a builtin type (e.g. list or dict), __base__ will be that.
Brr. There's a lot I don't know about post 2.2 typeobject.c.
Me too. :-)
Agreed.
I hope not. The dots are for extensions living inside a package; everything before the last dot ends up as __module__.
Oops. Can you fix it? Or are there complications? Seems to be broken in 2.2 too.
Great! I'll be offline Friday through Monday -- going to a weekend conference. --Guido van Rossum (home page: http://www.python.org/~guido/)

But if you derive from a builtin type (e.g. list or dict), __base__ will be that.
Brr. There's a lot I don't know about post 2.2 typeobject.c.
Me too. :-)
Agreed.
I hope not. The dots are for extensions living inside a package; everything before the last dot ends up as __module__.
Oops. Can you fix it? Or are there complications? Seems to be broken in 2.2 too.
Great! I'll be offline Friday through Monday -- going to a weekend conference. --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Guido van Rossum
-
Michael Hudson