Difference between type and class

Thomas Troeger thomas.troeger.ext at siemens.com
Fri Aug 1 07:05:07 EDT 2008


Steven D'Aprano wrote:
>> class A:
>> 	def bar(self):
>> 		print "A"
> 
> 
> Alas, you've chosen the worst-possible example to "clarify" matters, 
> because old-style classic classes are *not* unified with types, and will 
> disappear in the future:

Of course I wanted to write `class A(object)', but I keep forgetting 
this one because I'm still used to the old ways...

Will this disappear in Python 3.0., i.e. can you again simply write

class A:

and inherit from object automagically? That would be nice since that's 
what most people probably want.



More information about the Python-list mailing list