On 9/28/05, Tony Meyer <[EMAIL PROTECTED]> wrote:
> I'm not sure why I haven't seen this mentioned yet, but a leading
> double-underscore does really make a member private:

I thought about it, but I didn't mention it in the end because this
feature ("name mangling") isn't intended as a mechanism for making
things private - it's intended to prevent namespace clashes when doing
multiple inheritance. It can be used to make things private, true, but
that's abusing the feature, just as using __slots__ as a way of
"declaring variables" is an abuse - (__slots__ is a memory
optimisation feature).

--
Cheers,
Simon B,
[EMAIL PROTECTED],
http://www.brunningonline.net/simon/blog/
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to