September 29, 2005
Privacy and the Snake

There's rather an interesting thread going on over on c.l.py about private attributes and Python. It gave me the opportunity to post a link to one of my favourite c.l.py posts of all time, the Martellibot's wonderful essay decrying the "principle of least privilege". It should, as Steven D'Aprano says, be required reading for all developers, regardless of platform.

Also in the thread, the effbot comes to my defense on the subject of the rationale behind Python's name mangling feature, and links to a facinating thread from depths of Python's history in which the feature is originally discussed, and which contains this from Guido:"Python is an experiment in how much freedom programmers need. Too much freedom and nobody can read another's code; too little and expressiveness is endangered". Poetry.

BTW, do any Java-heads out there know whether or not cglib allows you to bypass private and protected?

Posted to Python by Simon Brunning at September 29, 2005 03:42 PM
Comments
Post a comment
Name:


Email Address:


URL:



Comments:


Remember info?