private

John Roth johnroth at ameritech.net
Sat Jun 29 18:34:38 EDT 2002


"James Kew" <james.kew at btinternet.com> wrote in message
news:afl3e4$f8abc$1 at ID-71831.news.dfncis.de...
>
> I don't -- in my admittedly very limited experience -- find Python
classes
> as immediately self-documenting. It's not obvious from the class
definition
> what is intended to be called or modfied by the client and what is
internal
> to the implementation.

The fact is, there is no such thing as a 'self-documenting' language.
COBOL demonstrated that to me a long time ago. If you want your
code to say something to someone, it's up to the two (or however many)
of you to set up coding conventions that communicate the intent - and
stick to them.

There are a number of such conventions within the Python community,
including the underscore for internal methods.

As a number of posters have mentioned, the issue has been
discussed many times. The general feeling is that access protection
attributes (and similar things) are not what Python is about.

Python does not support declarations at all. Some people feel this
is a weakness. Some people feel it is a strength. In general, the kinds
of problems which declarations are intended to solve are less visible
in Python than in compiled languages.

Hope this helps give you some background.

John Roth





More information about the Python-list mailing list