[New-bugs-announce] [issue9138] Tutorial: classes intro paragraph icky
Aahz
report at bugs.python.org
Thu Jul 1 23:48:54 CEST 2010
New submission from Aahz <aahz at pythoncraft.com>:
http://docs.python.org/dev/tutorial/classes.html
Chapter 9 of the Tutorial contains this intro paragraph:
Python's class mechanism adds classes to the language with a minimum
of new syntax and semantics. It is a mixture of the class mechanisms
found in C++ and Modula-3. As is true for modules, classes in Python
do not put an absolute barrier between definition and user, but
rather rely on the politeness of the user not to "break into the
definition." The most important features of classes are retained with
full power, however: the class inheritance mechanism allows multiple
base classes, a derived class can override any methods of its base
class or classes, and a method can call the method of a base class
with the same name. Objects can contain an arbitrary amount of data.
A coworker found particularly the third sentence incomprehensible, and
even with ten years of Python under my belt, I can't say that it makes
much more sense to me. I know what it must be trying to say and
therefore proffer this suggested rewrite:
Compared with other programming languages, Python's class mechanism
adds classes with a minimum of new syntax and semantics. It is a
mixture of the class mechanisms found in C++ and Modula-3. Python
classes provide all the standard features of Object Oriented
Programming: the class inheritance mechanism allows multiple base
classes, a derived class can override any methods of its base class
or classes, and a method can call the method of a base class with the
same name. Objects can contain arbitrary amounts and kinds of data.
As is true for modules, classes partake of the dynamic nature of
Python; users of a class can modify or break the class definition
even without changing the source code.
----------
assignee: docs at python
components: Documentation
messages: 109080
nosy: aahz, docs at python
priority: critical
severity: normal
stage: patch review
status: open
title: Tutorial: classes intro paragraph icky
type: behavior
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9138>
_______________________________________
More information about the New-bugs-announce
mailing list