Commit dc343d0
committed
gh-145369: Document that dataclass field objects should not be reused
Add warning to dataclasses documentation explaining that Field objects
returned by field() should not be reused across multiple fields or
classes, as they are modified in place by the decorator.1 parent a1ec746 commit dc343d0
1 file changed
Lines changed: 21 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
333 | 354 | | |
334 | 355 | | |
335 | 356 | | |
| |||
0 commit comments