Does Python really follow its philosophy of "Readability counts"?
prologic at shortcircuit.net.au
Wed Jan 14 04:35:54 CET 2009
On Wed, Jan 14, 2009 at 1:25 PM, Rhodri James
<rhodri at wildebst.demon.co.uk> wrote:
> I wouldn't violently object to having some means of policing class
> or module privacy, but it does have consequences. When it's a
> convention, you can break it; when it isn't, you can't, even if
> you do have good reason. Add that to the obviousness of the
> "leading underscore => private" convention, and I just don't see
> a burning need for it, that's all.
Bare in mind also, that enfocing access control / policing as you
called it has a performance hit as the machine (the Python vm)
has to perform checks each time members of an object are accessed.
I can think of no reason to want to do this at runtime hwatosever
and I've been developing in Python for quite some years now.
More information about the Python-list