A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2003-April/034921.html below:

[Python-Dev] Metatype conflict among bases?

[Python-Dev] Metatype conflict among bases? [Python-Dev] Metatype conflict among bases?Guido van Rossum guido@python.org
Tue, 22 Apr 2003 20:23:47 -0400
> Consider:
> 
>     class A(object):
>         class __metaclass__(type):
>             pass
> 
>     class B(A):  # TypeError: metatype conflict among bases
>         class __metaclass__(type):
>             pass
> 
> Now that's a weird error message at least!  There's only one base (A),
> and I'm telling Python explicitly to use the nested __metaclass__
> instead of A's __metaclass__!
> 
> Should I not be surprised that Python won't let me set the metatype
> explicitly?

The metaclass must be a subclass of the metaclass of all the bases.

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