New inited instance of class?

Peter Otten __peter__ at web.de
Sun Dec 7 04:26:17 EST 2003


Samuel Kleiner wrote:

> So can I make all my classes derive from object without
> doing so explicitly- IE, without having to change every
> single top-level class definition?
> 

You can do it on a per-file basis by putting

__metaclass__ = type

once before the class definitions.

Peter




More information about the Python-list mailing list