[Python-Dev] PEP 3000 and new style classes

Russell E. Owen rowen at cesmail.net
Fri Sep 9 23:23:19 CEST 2005

In article <20050909203037.GA7577 at solar.trillke.net>,
 hpk at trillke.net (holger krekel) wrote:

> On Fri, Sep 09, 2005 at 11:31 -0700, Russell E. Owen wrote:
> > In article <20050908211307.GA506 at mithrandi.za.net>,
> >  Tristan Seligmann <mithrandi-python-dev at mithrandi.za.net> wrote:
> > > 
> > > Why does it matter if the single statement you insert is spelled
> > > "  metaclass   = type" instead of "from   future   import whatever"?
> > > Remember, unlike the division example, you would only have to insert one
> > > statement, as opposed to changing every use of integer division.
> > 
> > It matters because "metaclass = type" is completely obscure. How would 
> > any non-expert have a clue what it means?
> How would this non-expert have a clue what 
> "from __future__ import new_style_classes" means? 

Because it's plain english.

Also because it's easy to look up. For example:

google for:
- python "from __future__ import"; the third link is useful, though a 
bit technical; presumably it's is in the manual somewhere as well
- python "new style classes" python; the first link is useful

If and when the __future__ directive under discussion is added, I would 
try googling for the whole line and probably hit it on the first go.

Now try that with "metaclass = type". Good luck. I tried all sorts of 
variants and came up with nothing except a tutorial on metaclasses, 
which was interesting, but NOT a ready explanation of what "metaclass = 
type" does.

-- Russell

More information about the Python-Dev mailing list