A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-October/029815.html below:

[Python-Dev] metaclass insanity

[Python-Dev] metaclass insanityGuido van Rossum guido@python.org
Wed, 30 Oct 2002 15:44:38 -0500
> > The best thing to do would perhaps to make __mro__ assignable, but
> > with a check that ensures the above constraint.  I think I'd take a
> > patch for that.
> 
> 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.

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/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4