Instantiating classes which are derived from built-in types.

Alex Martelli aleax at
Tue Nov 29 05:25:32 CET 2005

Paul Rubin <> wrote:

> aleax at (Alex Martelli) writes:
> > A is oldstyle -- a wart existing for backwards compatibility.
> I think it's time for "from __future__ import newclasses" since
> I hate having to type "class A(object):" instead of "class A:"
> all over the place.

Use __metaclass__=type exactly in the same location where you'd want to
import from __future__ and you will get exactly the same functionality.


More information about the Python-list mailing list