New submission from Terry J. Reedy <[email protected]>:
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: d...@python
components: Documentation
keywords: easy
messages: 120795
nosy: d...@python, terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Remove unneeded '(object)' from 3.x class examples
versions: Python 3.1, Python 3.2
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue10366>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com