[docs] [issue11974] Class definition gotcha.. should this be documented somewhere?
Raymond Hettinger
report at bugs.python.org
Sat Jun 21 23:59:10 CEST 2014
Raymond Hettinger added the comment:
Renee, thanks for the patch. It looks pretty good.
I've reworked a bit to accomplish the following:
* Added a short introductory a short discussion about class variables versus instance variables. This addresses other questions that tend to arise irrespective of mutability.
* Referenced the related discussion in"A Word About Names and Objects".
* Referenced the term "mutable" in the glossary.
* change "dangerous" to "unexpected" in accordance with the style guide and following Guido's own wording on the subject.
* Change the class names from "A" and "B" to a "Dog" class because readers tend to find that the more abstract "A" and "B" examples are a little harder to follow.
----------
Added file: http://bugs.python.org/file35716/class_instance_variables.diff
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11974>
_______________________________________
More information about the docs
mailing list