setattr() oddness

Sean DiZazzo half.italian at gmail.com
Fri Jan 15 21:37:38 CET 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