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 Scott.Daniels at Acm.Org
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4