Double underscores -- ugly?

Ben Finney bignose+hates-spam at benfinney.id.au
Wed Feb 20 04:54:58 CET 2008


benhoyt <benhoyt at gmail.com> writes:

> Then again, what's stopping us just using a single leading underscore?
> Nobody calls their own private methods _init or _add

You must be looking at different code from the rest of us. A single
leading underscore on the name *is* the convention for "this attribute
is not part of the external interface", which is about as "private" as
Python normally gets.

-- 
 \         “God forbid that any book should be banned. The practice is |
  `\               as indefensible as infanticide.” —Dame Rebecca West |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list