Does Python really follow its philosophy of "Readability counts"?
Delaney, Timothy (Tim)
tdelaney at avaya.com
Tue Jan 20 22:46:32 EST 2009
Terry Reedy wrote:
>> The compiled code differs.
>
> I *strongly* doubt that. Properties are designed to be transparent to
> user code that access atrributes through the usual dotted name
> notation precisely so that class code can be changed from
> x = ob
> to
> x = property(get_x, set_x, del_x)
> without changing user code.
He was talking about C# with that statement. In C#, the compiled code
differs depending on whether you use a property or an attribute. Or at
least that's how I interpreted it.
You are of course correct as to how Python does it.
Tim Delaney
More information about the Python-list
mailing list