Tkinter callback arguments

Mel mwilson at
Mon Nov 2 17:19:51 CET 2009

Alf P. Steinbach wrote:
> Your comment about "computed" makes it more clear what that's all about.
> Also Bertrand Meyer (Eiffel language creator) had idea like that, he
> called it "referential transparency". But I think when Python has this
> nice property mechanism, why do people change direct data attributes into
> properties and not the other way around or not at all, 

Python tends to prefer simple forms over complicated forms, so having a 
programmer write

x = something.that

and implementing a getter inside the call to something.__getattr__ is better 

x = something.that()

with a pair of needless parens, and then mangling the compiler/runtime to 
suddenly use the value of `that`, uncalled, if `something` happens to be an 
instance of the class we're discussing.

Note too that

something.that = x

is pretty clean, but

something.that() = x

can't be done at all, and the syntactically correct


just doesn't look like the simple assignment statement.


More information about the Python-list mailing list