Does Python really follow its philosophy of "Readability counts"?

Paul Rubin http
Wed Jan 14 01:35:31 EST 2009


"James Mills" <prologic at shortcircuit.net.au> writes:
> 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.

It's the other way around.  If the compiler knows that you aren't
creating new attributes on the fly, it can put them into fixed slots
like a C struct, and method calls become ordinary function calls
through a dispatch vector.



More information about the Python-list mailing list