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/2008-July/081129.html below:

[Python-Dev] Default metaclass in Python 3.0 modules

[Python-Dev] Default metaclass in Python 3.0 modules [Python-Dev] Default metaclass in Python 3.0 modulesBen Finney bignose+hates-spam at benfinney.id.au
Tue Jul 15 12:26:41 CEST 2008
Eric Smith <eric+python-dev at trueblade.com> writes:

> Ben Finney wrote:
> > "Benjamin Peterson" <musiccomposition at gmail.com> writes:
> >> Line 94-95 in unittest.py (trunk):
> >> # All classes defined herein are 'new-style' classes, allowing use of 'super()'
> >> __metaclass__ = type
> >
> > Hmm, you're right; I see that in Python 2.5.2 'unittest.py'.
> >
> > Why is it not there in 3.0's 'unittest.py'? Is this achieved some
> > other way?
> 
> In 3.0 there are only new-style classes, so nothing needs to be done
> there.

What makes that happen in the case where a class declares no
superclass? Is there an invisible enforced "__metaclass__ = type" for
every module? Where can I read about this change?

-- 
 \       “The apparent lesson of the Inquisition is that insistence on |
  `\         uniformity of belief is fatal to intellectual, moral, and |
_o__)    spiritual health.” —_The Uses Of The Past_, Herbert J. Muller |
Ben Finney

More information about the Python-Dev mailing list

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