Commit ecf14e6
authored
* Split type_new() into into many small functions.
* Add type_new_ctx structure to pass variables between subfunctions.
* Initialize some PyTypeObject and PyHeapTypeObject members earlier
in type_new_alloc().
* Rename variables to more specific names.
* Add "__weakref__" identifier for type_new_visit_slots().
* Factorize code to convert a method to a classmethod
(__init_subclass__ and __class_getitem__).
* Add braces to respect PEP 7.
* Move variable declarations where the variables are initialized.
1 parent 75a06f0 commit ecf14e6
2 files changed
Lines changed: 736 additions & 397 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4972 | 4972 | | |
4973 | 4973 | | |
4974 | 4974 | | |
4975 | | - | |
| 4975 | + | |
4976 | 4976 | | |
4977 | | - | |
| 4977 | + | |
| 4978 | + | |
4978 | 4979 | | |
| 4980 | + | |
4979 | 4981 | | |
4980 | 4982 | | |
4981 | 4983 | | |
| |||
0 commit comments