properties and get/set methods

Mike C. Fletcher mcfletch at rogers.com
Sun Apr 6 14:31:30 EDT 2003


Greg Chapman wrote:

>On Sat, 05 Apr 2003 23:48:41 -0500, "Mike C. Fletcher" <mcfletch at rogers.com>
>wrote:
>  
>
>>As for how the problem ((a deficiency in the property API IMO) of not 
>>knowing the name being set/get within the get/set methods) gets worked 
>>around.  I (as seen above) do some comparatively minor (but still 
>>    
>>
...

>You could always use somthing like this:
>  
>
<snip evil ;) hack>

Sure, but then the council of bishops and dervishes gets after you for 
being an apostate and an unbeliever ;) .  It's tempting, but I'm not 
sure it's so tempting that I'd actually use it in a general library.  
However, I saw that pattern used at PyCon by someone, so the chances 
that you can start a decent little cult are probably pretty good :) .

I just don't trust the whole "reach out and change a parent namespace" 
approach.  Maybe I'll revise that opinion, but for now I consider it 
something that should be addressed by Guido & co, rather than something 
I want to hack around myself.  If it never does get addressed I may wind 
up softening.

Temptation to either side, I walk the tightrope,
and wonder for a moment if even the fall itself might bring joy :) .

Mike

_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/








More information about the Python-list mailing list