setattr and variable names: bug or feature?
Gerrit Holl
gerrit.holl at pobox.com
Fri Feb 25 11:33:14 EST 2000
Dear bottomless information source,
>>> class Foo:
... pass
...
>>> setattr(Foo, '', '')
>>> setattr(Foo, '`', '')
>>> setattr(Foo, '\'', '')
>>> setattr(Foo, '!@#{}\0\0\0', '')
>>> dir(Foo)
['', '!@#{}\000\000\000', "'", '__doc__', '__module__', '`']
Is this a bug or a feature, or None of both?
just-found-it-interesting-ly y'rs - gerrit
More information about the Python-list
mailing list