Re: [Python-Dev] metaclass insanity

Guido van Rossum <guido@python.org> writes:
Shouldn't be too hard.
I'd also take a patch for assignable __bases__. Note that there are constraints between __bases__ and __base__.
Should assigning to __bases__ automatically tweak __mro__ and __base__? Guess so. What would assigning to __base__ do in isolation? Perhaps that shouldn't be writeable.
I'd also take a patch for assignable __name__.
This is practically a one-liner, isn't it? Not hard, anyway. And there was me wondering what I was going to do this evening. Cheers, M. -- Now this is what I don't get. Nobody said absolutely anything bad about anything. Yet it is always possible to just pull random flames out of ones ass. -- http://www.advogato.org/person/vicious/diary.html?start=60

Yes. Note that changing __base__ should not be done lightly -- basically, the old and new base must be layout compatible, exactly like for assignment to __class__.
What would assigning to __base__ do in isolation? Perhaps that shouldn't be writeable.
Perhaps it could be writable when __bases__ is a 1-tuple. But it's fine if it's not writable.
I'd also take a patch for assignable __name__.
This is practically a one-liner, isn't it? Not hard, anyway.
Probably. Can't remember why I didn't do it earlier.
And there was me wondering what I was going to do this evening.
I don't have that problem -- a Zope customer problem was waiting for me today. :-( --Guido van Rossum (home page: http://www.python.org/~guido/)

Yes. Note that changing __base__ should not be done lightly -- basically, the old and new base must be layout compatible, exactly like for assignment to __class__.
What would assigning to __base__ do in isolation? Perhaps that shouldn't be writeable.
Perhaps it could be writable when __bases__ is a 1-tuple. But it's fine if it's not writable.
I'd also take a patch for assignable __name__.
This is practically a one-liner, isn't it? Not hard, anyway.
Probably. Can't remember why I didn't do it earlier.
And there was me wondering what I was going to do this evening.
I don't have that problem -- a Zope customer problem was waiting for me today. :-( --Guido van Rossum (home page: http://www.python.org/~guido/)
participants (2)
-
Guido van Rossum
-
Michael Hudson