[docs] [issue10366] Remove unneeded '(object)' from 3.x class examples
Terry J. Reedy
report at bugs.python.org
Mon Nov 8 20:19:12 CET 2010
New submission from Terry J. Reedy <tjreedy at udel.edu>:
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!).
assignee: docs at python
nosy: docs at python, terry.reedy
stage: needs patch
title: Remove unneeded '(object)' from 3.x class examples
versions: Python 3.1, Python 3.2
Python tracker <report at bugs.python.org>
More information about the docs