However, I don't think 'setattr' with no value meaning to delete
the attribute is a necessarily 'special case' in the *language*.
I seems like a perfectly sensible semantics. I think what
Guido meant was that it was a 'special case' for the *implementation*.
But, I have no objection to 'delattr', either.
[ I've usually managed so far with setattr( obj, 'attr' , None ),
which is quite different semantics, and moves the special case into
my code, e.g. 'if hasattr( obj, attr ) and getattr( obj, attr ):' ]
^^^
- Steve Majewski (804-982-0831) <sdm7g@Virginia.EDU>
- UVA Department of Molecular Physiology and Biological Physics