On Sun, 31 Dec 2006 21:23:03 -0800, Paul Rubin wrote: > Steven D'Aprano <[EMAIL PROTECTED]> writes: >> > At the same time, you should ponder very >> > carefully the reasons why the original author deemed it important to >> > make those attributes private in the first place. >> >> In my experience, it is mostly because they come from >> bondage-and-domination languages where it is expected that >> everything is private except for a small, carefully chosen public >> API, rather than from languages like Python that encourages openness >> and a philosophy of "we're all adults here". > > Funny thing, some of those B&D languages were designed by people who > had plenty of experience with Lisp and were tired of being bitten by > its Python-like looseness.
I never said they were wrong to do so. But those languages aren't Python. Python is designed for those who are tied of the constant restraint of B&D languages. >> I wonder how many double-underscore "private" attributes are used in >> the Python standard library? That should give you an idea of "best >> practice" use of private attributes in Python. > > If socket.py is an example of best practice use of private attributes, I > shudder to imagine what kind of cruft must lurk in legacy applications. socket.py doesn't have any double-underscore private attributes (at least not in Python 2.4). So what's your point? -- Steven. -- http://mail.python.org/mailman/listinfo/python-list