[docs] [issue12086] Tutorial doesn't discourage name mangling

Łukasz Langa report at bugs.python.org
Mon May 16 12:17:57 CEST 2011


Łukasz Langa <lukasz at langa.pl> added the comment:

I'd like to see that section gone altogether. The tutorial is designed to be the first point of contact with the language. In that context name mangling is an obscure detail with an unlikely use case.

If anything, the tutorial should simply state that private variables are by convention prepended with a single underscore. Maybe there's place for a separate short article which would nicely explain the philosophy behind the lack of an enforcing `private` modifier. The "we're all consenting adults here" stuff.

Agreed with Ezio that "private" is in itself a poor name for what underscore (regardless whether a single one or two) really means.

----------

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


More information about the docs mailing list