SIGN IN SIGN UP
python / cpython UNCLAIMED

The Python programming language

0 0 1 Python

bpo-43770: Refactor type_new() function (GH-25325)

* 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.
V
Victor Stinner committed
ecf14e6557c6e4f7af9c0d6460d31fe121c22553
Parent: 75a06f0
Committed by GitHub <noreply@github.com> on 4/10/2021, 9:15:32 PM