setattr() oddness

Sean DiZazzo half.italian at gmail.com
Fri Jan 15 15:37:38 EST 2010


Should the following be legal?

>>> class TEST(object): pass
...
>>> t = TEST()
>>> setattr(t, "", "123")
>>> getattr(t, "")
'123'

~Sean



More information about the Python-list mailing list