[Edu-sig] quantum instance
ajsiegel at optonline.net
Sat Sep 17 23:57:40 CEST 2005
>> Would we have flatted the area method before properties, through the
>> __getattr__ mechanism. Were properties put into the language to make it
>> more convenient for us to do this kind of thing - *as a way of
>> encouraging this kind of pattern*. I think you - implicated or
>> explicitly - think yes. I think I explicitly think no.
>I don't understand how you can say "no" to this. Properties exist
>precisely to make it simpler to call methods through attribute access
>syntax, period. My instinct is that, pre-properties, most programmers
>would not have resorted to the __getattr__ magic for these simple cases;
>they would just provide a method-call API (as I did for my graphics
>library). With properties, I would probably now take the other route.
And I don't understand how you can't understand that.
Sometimes we just disagree, it seems.
The version of Python I run - Python 2.4 (#60, Nov 30 2004, 11:49:19) -
discourages me from writing extra code for the purpose of revealing less.
It comes with no "properties" exception of which I am aware.
I guess we all have our own sense of elegance, and the properties discussion
leads me to believe that there is more than one version of Python 2.4 (#60,
Nov 30 2004, 11:49:19) floating around. Which is as it should be.
And as it should be taught it should be, it seems to me.
And don't expect that you disagree with *that*.
More information about the Edu-sig