Message 372885 - Python tracker
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.