Skip to content

Commit

Permalink
Fixed make_class example. (#1258)
Browse files Browse the repository at this point in the history
The example only makes sense if `C2` is the class examined, as that's the one we dynamically created.
  • Loading branch information
carltongibson committed Mar 12, 2024
1 parent 5341c0f commit 1cb58a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -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'>
```

Expand Down

0 comments on commit 1cb58a5

Please sign in to comment.