[issue17351] Fixed python3 descriptor documentation example + removal of explicit "object" inheritance in docs

Phil Elson report at bugs.python.org
Mon Mar 4 15:36:39 CET 2013


New submission from Phil Elson:

The example at http://docs.python.org/3.4/howto/descriptor.html#properties does not run due to the old style "raise AttributeError, message" form. 


This patch fixes the problem, and also goes through the docs to remove explicit sub-classing from "object". The only remaining instances of this now are:

$> grep -r -E "class .*\(object\)\:" Doc/*               
Doc/howto/pyporting.rst:   class UnicodeMixin(object):
Doc/reference/compound_stmts.rst:   class Foo(object):
Doc/tools/sphinxext/pyspecific.py:class PyDecoratorMixin(object):
Doc/whatsnew/2.6.rst:    class C(object):
Doc/whatsnew/2.2.rst:   class C(object):
Doc/whatsnew/2.2.rst:   class C(object):
Doc/whatsnew/2.2.rst:   class C(object):
Doc/whatsnew/2.2.rst:   class C(object):
Doc/whatsnew/2.2.rst:   >>> class C(object):


Which are all (minus tools/sphinxext/pyspecific) referring to python2 in some context.

I'm not bound to fixing the explicit object subclassing, so if it is better off not being here, that's fine.

Cheers,

----------
assignee: docs at python
components: Documentation
files: pelson_doc_decorator.diff
keywords: patch
messages: 183458
nosy: docs at python, pelson, rhettinger
priority: normal
severity: normal
status: open
title: Fixed python3 descriptor documentation example + removal of explicit "object" inheritance in docs
versions: Python 3.1
Added file: http://bugs.python.org/file29305/pelson_doc_decorator.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue17351>
_______________________________________


More information about the Python-bugs-list mailing list