This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients docs@python, ezio.melotti, georg.brandl, lukasz.langa, rhettinger, sheep, tim.golden
Date 2011-05-16.09:34:18
SpamBayes Score 3.37532e-08
Marked as misclassified No
Message-id <1305538459.87.0.21843464717.issue12086@psf.upfronthosting.co.za>
In-reply-to
Content
I think the main problem here is that they are called "private" and people coming from other languages assume that the double underscore is the Python way to mark variables as private, whereas the appearance of being private is just a side effect of the name mangling.

This part should IMHO focus on the name mangling, explaining what it is and what it's useful for, and mention clearly that this doesn't really make the variable "private", because it can still be accessed through the mangled name.

The section could also mention that the word "private" here doesn't mean the same thing as in other language.

I don't know if the "trust the programmer" philosophy found in Python is explained somewhere in the doc, but if not it could be added to the tutorial or the FAQ.
History
Date User Action Args
2011-05-16 09:34:19ezio.melottisetrecipients: + ezio.melotti, georg.brandl, rhettinger, tim.golden, docs@python, lukasz.langa, sheep
2011-05-16 09:34:19ezio.melottisetmessageid: <1305538459.87.0.21843464717.issue12086@psf.upfronthosting.co.za>
2011-05-16 09:34:19ezio.melottilinkissue12086 messages
2011-05-16 09:34:18ezio.melotticreate