Commit 0cc08c6
Add supported sunder names to Enum
This change adds the sunder names `_generate_next_value_`
and `_missing_` to the `__dir__` method of `EnumType` and `Enum`.
In Addition, The instance level sunder names
`_add_alias_` and `_add_value_alias_` are added to `Enum.__dir__`.
With the sunder names exposed in the `dir()` method,
the REPL autocomplete will also show them.
Co-Authored-By: SimonGPrs <[email protected]>__dir__
1 parent d4e5802 commit 0cc08c6
File tree
4 files changed
+17
-4
lines changed- Doc/library
- Lib
- test
- Misc/NEWS.d/next/Library
4 files changed
+17
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
224 | | - | |
| 224 | + | |
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
| |||
330 | 330 | | |
331 | 331 | | |
332 | 332 | | |
333 | | - | |
| 333 | + | |
334 | 334 | | |
335 | 335 | | |
336 | 336 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
| 780 | + | |
| 781 | + | |
780 | 782 | | |
781 | 783 | | |
782 | 784 | | |
| |||
1290 | 1292 | | |
1291 | 1293 | | |
1292 | 1294 | | |
1293 | | - | |
| 1295 | + | |
| 1296 | + | |
1294 | 1297 | | |
1295 | 1298 | | |
1296 | 1299 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5105 | 5105 | | |
5106 | 5106 | | |
5107 | 5107 | | |
| 5108 | + | |
| 5109 | + | |
5108 | 5110 | | |
5109 | 5111 | | |
5110 | 5112 | | |
| |||
5147 | 5149 | | |
5148 | 5150 | | |
5149 | 5151 | | |
| 5152 | + | |
| 5153 | + | |
| 5154 | + | |
| 5155 | + | |
5150 | 5156 | | |
5151 | 5157 | | |
5152 | 5158 | | |
| |||
5533 | 5539 | | |
5534 | 5540 | | |
5535 | 5541 | | |
| 5542 | + | |
5536 | 5543 | | |
5537 | 5544 | | |
5538 | 5545 | | |
| |||
5548 | 5555 | | |
5549 | 5556 | | |
5550 | 5557 | | |
5551 | | - | |
| 5558 | + | |
| 5559 | + | |
5552 | 5560 | | |
5553 | 5561 | | |
5554 | 5562 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments