Prothon gets Major Facelift in Vers 0.1.0 [Prothon]

Michael Chermside mcherm at mcherm.com
Mon May 24 09:43:01 EDT 2004


gabor writes:
> look...i am not asking for a way in python to COMPLETELY RESTRICT the
> access to a variable... i hint is enough... now...if i know correctly
> that means that i have to prefix my wanto-to-be-private variables with a
> "_"... that restriction would be enough for me. my problem is with the
> syntax. i HATE anything that even remotely resembles perl/hungarian
> notation.
     [...]
> the point is:
> i only want to WRITE that the variable is private once...
> i don't want to deal with _prefixed variables in my whole code...

Sounds to me as if you are complaining about the poor quality of
DOCUMENTATION for many Python programs. When using a class, the
documentation ought to state which fields and methods are intended
for "public" consumption, and which are intended only for "internal"
use. Of course, using the "_" prefix convention is a perfectly
valid way of documenting it, but a mention in the docstring would
be OK as well. If you are using code which has neither, where the
author does nothing to indicate how the class should be used, then
that code's author needs to learn to document better.

-- Michael Chermside





More information about the Python-list mailing list