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:
Carlton Gibson 2024-03-12 19:12:43 +01:00 committed by GitHub
parent 5341c0f1e4
commit 1cb58a5536
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -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'>
```