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 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. -- http://mail.python.org/mailman/listinfo/python-list