Re:Python best practices
by BrandonM on Tuesday July 08, 2008 @10:06PM
(#240649)
> class fooclass: ... || class Fooclass(object): ...
Is this a joke?
No... it is generally recommended that class names are capitalized, and any classes you create are supposed to inherit from object. This mainly comes into effect when using super().
In Python 3K, I'm pretty sure that all classes will inherit from object without having to explicitly say it.
Re:Python best practices
by Erwin on Wednesday July 09, 2008 @05:01AM
(#240938)
More importantly property getters will silently do nothing in old-style classes and just let the attribute setting through without calling the setter, while getters work fine.
Is this a joke?
No... it is generally recommended that class names are capitalized, and any classes you create are supposed to inherit from object. This mainly comes into effect when using super().
In Python 3K, I'm pretty sure that all classes will inherit from object without having to explicitly say it.