[Python-Dev] __mangled in stdlib considered poor form

Barry Warsaw barry at python.org
Mon Aug 30 01:37:40 CEST 2004


On Sat, 2004-08-28 at 14:50, Guido van Rossum wrote:

> There's one potential use case where I'd like to keep the private name
> even if there's a mangled use of it nearby: when the private name
> really is intended to be private, and the mangled use is a "friend" in
> the C++ sense. Sometimes (though rarely) the stdlib has to indulge in
> practices that aren't good example code, because it's the stdlib, and
> it should implement functionality in the most bulletproof way
> possible. Using private names for internal details is the right thing
> sometimes.

Please don't just mindlessly change all leading double underscores to
singles.  +1, when following Guido's guidelines above though.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20040829/59eee9a3/attachment.pgp


More information about the Python-Dev mailing list