[Python-Dev] Requesting that a class be a new-style class
Guido van Rossum
gvanrossum at gmail.com
Sun Feb 20 06:33:31 CET 2005
> I didn't dig into the C but does having 'type'
> as metaclass guarantee the same behavior as inheriting 'object' or does object
> provide something type doesn't? *wince*
No, they're equivalent. __metaclass__ = type cause the base class to
be object, and a base class of object causes the metaclass to be type.
But I agree wholeheartedly: class C(object): is much preferred.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list