Commit a25c331
docs: rename "value restriction" to "value-constrained type variable" (#21112)
Closes #17828.
The docs used "value restriction" to describe type variables like `T:
(str, bytes)`, but the runtime attribute is `TypeVar.__constraints__`.
This PR updates the terminology across the affected doc pages to use
"value-constrained type variable" consistently, matching the runtime
naming and the term discussed in #17828.
Changes:
- `generics.rst`: rename section title, update prose, add new anchor
`value-constrained-type-variables` (old anchor
`type-variable-value-restriction` kept for backward compat)
- `more_types.rst`: update cross-reference text
- `command_line.rst`: update cross-reference text
Made with [Cursor](https://cursor.com)
Co-authored-by: Leo Ji <nuglifeleoji@gmail.com>1 parent 465b887 commit a25c331
3 files changed
+12
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
551 | 551 | | |
552 | 552 | | |
553 | 553 | | |
554 | | - | |
| 554 | + | |
555 | 555 | | |
556 | 556 | | |
557 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
693 | 693 | | |
694 | 694 | | |
695 | 695 | | |
| 696 | + | |
696 | 697 | | |
697 | 698 | | |
698 | | - | |
699 | | - | |
| 699 | + | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
| |||
727 | 728 | | |
728 | 729 | | |
729 | 730 | | |
730 | | - | |
731 | | - | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
732 | 734 | | |
733 | 735 | | |
734 | 736 | | |
| |||
760 | 762 | | |
761 | 763 | | |
762 | 764 | | |
763 | | - | |
| 765 | + | |
764 | 766 | | |
765 | 767 | | |
766 | 768 | | |
| |||
775 | 777 | | |
776 | 778 | | |
777 | 779 | | |
778 | | - | |
| 780 | + | |
779 | 781 | | |
780 | 782 | | |
781 | 783 | | |
| |||
1330 | 1332 | | |
1331 | 1333 | | |
1332 | 1334 | | |
1333 | | - | |
| 1335 | + | |
1334 | 1336 | | |
1335 | 1337 | | |
1336 | 1338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
| 306 | + | |
| 307 | + | |
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| |||
0 commit comments