Georg Brandl ge...@python.org added the comment:
No objections noted, closing.
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8638
___
Georg Brandl ge...@python.org added the comment:
The section titled Private Variables was updated fairly recently to be more
in line with the Python philosophy. In its current form (which I verified to
be present at e.g. http://docs.python.org/tutorial/classes#private-variables) I
don't
Skip Montanaro s...@pobox.com added the comment:
Maybe the wording should be changed, but name mangling serves a useful
purpose. There are two definitions of private which seem to be a
bit conflated in this section:
* private as in, this name is not part of the public API - use it
at your
Terry J. Reedy tjre...@udel.edu added the comment:
Double underscore name mangling is for avoiding name clashes with base classes,
not for 'private attributes'. This is such an advanced and rarely used feature
that it hardly seems appropriate for the tutorial.
--
nosy: +tjreedy
Clovis Fabricio nosklo+pyt...@gmail.com added the comment:
I help in #python and always suggest people to not use double-underscore name
mangling when they mean private.
I agree that name mangling shouldn't be on the tutorial at all. It misleads
everybody coming from other languages into
Fred L. Drake, Jr. fdr...@acm.org added the comment:
On Fri, May 7, 2010 at 6:35 PM, Terry J. Reedy rep...@bugs.python.org wrote:
This is such an advanced and rarely used feature that it hardly seems
appropriate for the tutorial.
The problem with just leaving it out is that learners
New submission from Lucian Ursu lucian_u...@yahoo.com:
I suggest that name mangling should not be recommended as a way of having
private attributes. Instead, one underscore should be suggested as a signal
that the attribute is private.
This suggestion comes after discussing with some of the
Éric Araujo mer...@netwok.org added the comment:
Note that the opinion of people helping in #python does not necessarily (or
frequently) match the one of core Python developers. That said, I agree with
this particular suggestion.
--
nosy: +merwok
Changes by Dan Buch daniel.b...@gmail.com:
--
nosy: +meatballhat
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8638
___
___
Python-bugs-list