Jim Fulton wrote:
> Ian Bicking wrote:
>> Jim Fulton wrote:
>>> Ian Bicking wrote:
>>>>        Private attributes should have two leading underscores, no
>>>>        trailing underscores.
>>>>
>>>> This conflicts with a previous suggestion "Generally, double leading 
>>>> underscores should be used only to avoid name conflicts with 
>>>> attributes in classes designed to be subclassed."  Or perhaps 
>>>> "private attributes" needs to be better explained.
...
>> I really really hate double underscores, but I thought I'd let some 
>> other people suggest stronger language first....
> 
> Can we officially mark __private as a mistake. Perhaps:
> - Strongly discourage it in the style guide
> - Mark it in the language reference as a deprecated feature
> - Generate deprecation warnings when it is used?
>    (This might be too much.)

Perhaps "The __ name convention is designed for 'mixins'; as a means of
enforcing "private" it is both ineffective and annoying.  For example,
distutils.msvccompiler uses a bunch of instance variables which would I
would like to access in a subclass, but are "unavailable" because the
author could not imagine why I would need them.

--Scott David Daniels
[EMAIL PROTECTED]

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to