On 11/28/2009 10:38 PM, The Music Guy wrote:
If you use it a lot, it is likely 1) you have abused class syntax for
what should have been a dict or 2) what you need is to override
__getattr__/__getattribute__ and __setattr__

Oh boy...here we go. :|
<sniprant>

ok, then what's your use case, AFAICT in the discussion here and previous ones, nobody has yet described a realistic and compelling situation where setattr/getattr is the best solution. That's why the discussion tended to end with "not used frequently enough"; simply because nobody can turn up with a use case to justify a new syntax, especially since all the proposed syntax are ugly (the most acceptable one, for me, is obj.[foo], still ugly but not as ugly as the others).
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to