Underscore data hiding (was python development practices?)

Skip Montanaro skip at pobox.com
Wed Oct 31 19:42:03 EST 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)
http://www.mojam.com/
http://www.musi-cal.com/




More information about the Python-list mailing list