3 ms·
I think you neglected the line in front of it, which does define FooBase. 1. >>> FooBase = type("FooBase", (object,), {}) 2. >>> Foo = type("Foo", (Foo
by jackpirate 15y ago
I think you neglected the line in front of it, which does define FooBase.
1. >>> FooBase = type("FooBase", (object,), {})
2. >>> Foo = type("Foo", (FooBase,), {'bar' : 42})
Although I am not a python expert, so you may be right... in which case, how does line one not work?
- irahul 15y agoI stand corrected - I was skimming and didn't notice. The example is correct - I was wrong.