Fixed make_class example. (#1258)
The example only makes sense if `C2` is the class examined, as that's the one we dynamically created.
This commit is contained in:
parent
5341c0f1e4
commit
1cb58a5536
|
@ -689,7 +689,7 @@ Sometimes you may want to create a class programmatically.
|
|||
>>> C2 = make_class("C2", {"x": field(type=int), "y": field()})
|
||||
>>> fields(C1) == fields(C2)
|
||||
True
|
||||
>>> fields(C1).x.type
|
||||
>>> fields(C2).x.type
|
||||
<class 'int'>
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue