Commit baf11a4
* Add supported sunder names to Enum `__dir__`
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 <107691772+SimonGPrs@users.noreply.github.com>
Co-authored-by: Ethan Furman <ethan@stoneleaf.us>
1 parent ef2246f commit baf11a4
4 files changed
Lines changed: 21 additions & 6 deletions
File tree
- Doc/library
- Lib
- test
- Misc/NEWS.d/next/Library
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
222 | 222 | | |
223 | 223 | | |
224 | 224 | | |
225 | | - | |
| 225 | + | |
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
| |||
355 | 355 | | |
356 | 356 | | |
357 | 357 | | |
358 | | - | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| 787 | + | |
| 788 | + | |
787 | 789 | | |
788 | 790 | | |
789 | 791 | | |
| |||
1297 | 1299 | | |
1298 | 1300 | | |
1299 | 1301 | | |
1300 | | - | |
| 1302 | + | |
| 1303 | + | |
1301 | 1304 | | |
1302 | 1305 | | |
1303 | 1306 | | |
| |||
| 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 | | |
| |||
5178 | 5184 | | |
5179 | 5185 | | |
5180 | 5186 | | |
5181 | | - | |
| 5187 | + | |
5182 | 5188 | | |
| 5189 | + | |
5183 | 5190 | | |
5184 | | - | |
| 5191 | + | |
5185 | 5192 | | |
| 5193 | + | |
5186 | 5194 | | |
5187 | 5195 | | |
5188 | 5196 | | |
| |||
5537 | 5545 | | |
5538 | 5546 | | |
5539 | 5547 | | |
| 5548 | + | |
5540 | 5549 | | |
5541 | 5550 | | |
5542 | 5551 | | |
| |||
5552 | 5561 | | |
5553 | 5562 | | |
5554 | 5563 | | |
5555 | | - | |
| 5564 | + | |
| 5565 | + | |
5556 | 5566 | | |
5557 | 5567 | | |
5558 | 5568 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments