python - what does 'objects being subclassable' mean? -
different programming languages define “object” in different ways. in some, means objects must have attributes , methods; in others, means objects subclassable. in python, definition looser; objects have neither attributes nor methods (more on in chapter 3), , not objects subclassable (more on in chapter 5).
i coming c++/java
background.
to subclassable means can inherit them. e.g.
class foo(object): pass
object
here subclassable because foo can inherit it.
Comments
Post a Comment