Roy Smith <[email protected]> added the comment:
Just as another edge case, type() can do the same thing:
Foo = type("Foo", (object,), {"a b": 1})
f = Foo()
for example, will create a class attribute named "a b". Maybe this actually
calls setattr() under the covers, but if it's going to be documented, it should
be noted in both places.
----------
nosy: +roysmith
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35105>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com