Is this considered black magic?
Laura Creighton
lac at strakt.com
Mon Nov 12 11:02:38 EST 2001
I supplied the original version, and for my first trick I wanted to
silently skip objects that don't have a method whether or not
they have an attribute-that-is-not-a-method by the same name.
Sort of 'If you can do this, do it, if you can't, no problem ...'
This sentence reveals why I went out and made that sinful ugly
hack in the first place <object.__class__.__dict__[key](object, *args),
for those of you that missed it>. In the internal dictionary I keep in
my head, an 'attribute' is not callable. Up until yesterday, I didn't
realise that the Python Usage is for methods to also be called attributes.
So now I have to rearrange the contents of my skull again. It's a good
thing that I enjoy this...
I have a new problem. I've just lost a major amount of precision in my
language usage. What is the collective noun for 'attributes that aren't
methods (you can't call them)'?
Laura Creighton
More information about the Python-list
mailing list