Python class inherits object -


is there reason class declaration inherit object?

i found code , can't find reason why.

class myclass(object):     # class code follows... 

yes, 'new style' object. feature introduced in python2.2.

new style objects have different object model classic objects, , things won't work old style objects, instance, super(), @property , descriptors. see article description of new style class is:

http://docs.python.org/release/2.2.3/whatsnew/sect-rellinks.html

so link description of differences: what difference between old style , new style classes in python?


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -