Underscore data hiding (was python development practices?)

Skip Montanaro skip at pobox.com
Thu Nov 1 01:42:03 CET 2001

    >> A double leading underscore is requred to coax Python into mangling
    >> an attribute.

    Peter> heh... so:

    Peter> C++::private == Python."__*"
    Peter> C++::protected == Python."_[a-zA-Z]*"
    Peter> C++::public == Python."[a-zA-Z]*"

    Peter> ;)

Smiley or not, you seem to be trying a bit too hard to compare Python with
C++.  They serve dramatically different audiences.  After all, "we're all
adults here".  That held true when I first heard it several years ago and it
holds true today.

Skip Montanaro (skip at pobox.com)

More information about the Python-list mailing list