Paul Rubin a écrit :
Bruno Desthuilliers <bruno.42.desthuilli...@websiteburo.invalid> writes:
Given that the convention for "protected" attributes in Python is to
prefix them with an underscore, I fail to see how one could
"accidentally" mess with implementation details. Typing a leading
underscore is rarely a typo.

We are talking about the accidental creation of new attributes in
places outside the initializer.

Nope. This was about encapsulation and data-hiding, cf:

http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/068bc54bca830c46/049a721414f4d4da?rnum=41&_done=%2Fgroup%2Fcomp.lang.python%2Fbrowse_frm%2Fthread%2F068bc54bca830c46%3F#doc_83a09b54d386eb6c

and the convention James refered to was obviously the naming convention.


--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to