Message372885
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. |
|
Date |
User |
Action |
Args |
2020-07-02 21:27:00 | roysmith | set | recipients:
+ roysmith, rhettinger, terry.reedy, vstinner, nedbat, steven.daprano, chris.jerdonek, docs@python, serhiy.storchaka, pablogsal, Windson Yang, xtreak, orlnub123 |
2020-07-02 21:26:59 | roysmith | set | messageid: <1593725219.99.0.372680081376.issue35105@roundup.psfhosted.org> |
2020-07-02 21:26:59 | roysmith | link | issue35105 messages |
2020-07-02 21:26:59 | roysmith | create | |
|