Message120795
In 3.x, "(object)" is now superfluous in class statements. Reference manual 7.7. Class definitions has simply
class Foo: pass
In library manual 2. Built-in Functions, class examples for classmethod and staticmethod are the same. Class examples for dir, property, and type still have '(object)' in their class examples. Section 5.11.4. Methods example omits it. I cannot think of anywhere else there should be such examples.
I think we should be consistent and remove the remaining occurrences of '(object)' in the function examples. They can only confuse newcomers.
This part is easy.
I also think the doc for 'class' should say that the default inheritance is from the base class *object* (I presume this should be true in all implementations) and that
class Foo(object): pass
is the same as the above (unless the name 'object' has been rebound!). |
|
Date |
User |
Action |
Args |
2010-11-08 19:19:12 | terry.reedy | set | recipients:
+ terry.reedy, docs@python |
2010-11-08 19:19:12 | terry.reedy | set | messageid: <1289243952.54.0.613327832426.issue10366@psf.upfronthosting.co.za> |
2010-11-08 19:19:09 | terry.reedy | link | issue10366 messages |
2010-11-08 19:19:08 | terry.reedy | create | |
|