File tree Expand file tree Collapse file tree 3 files changed +5
-3
lines changed
Misc/NEWS.d/next/Core_and_Builtins Expand file tree Collapse file tree 3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,7 @@ Other language changes
207207* The :attr: `~object.__dict__ ` and :attr: `!__weakref__ ` descriptors now use a
208208 single descriptor instance per interpreter, shared across all types that
209209 need them.
210+ This speeds up class creation, and helps avoid reference cycles.
210211 (Contributed by Petr Viktorin in :gh: `135228 `.)
211212
212213
Original file line number Diff line number Diff line change @@ -6070,11 +6070,11 @@ class IntSubclass(int):
60706070 None ,
60716071 )
60726072 with self .assertRaises (AttributeError ):
6073- print ( weakref_descriptor .__get__ (True , bool ) )
6073+ weakref_descriptor .__get__ (True , bool )
60746074 with self .assertRaises (AttributeError ):
6075- print ( weakref_descriptor .__get__ (SlotClass (), SlotClass ) )
6075+ weakref_descriptor .__get__ (SlotClass (), SlotClass )
60766076 with self .assertRaises (AttributeError ):
6077- print ( weakref_descriptor .__get__ (IntSubclass (), IntSubclass ) )
6077+ weakref_descriptor .__get__ (IntSubclass (), IntSubclass )
60786078
60796079
60806080if __name__ == "__main__" :
Original file line number Diff line number Diff line change 11The :attr: `object.__dict__ ` and :attr: `!__weakref__ ` descriptors now use a
22single descriptor instance per interpreter, shared across all types that
33need them.
4+ This speeds up class creation, and helps avoid reference cycles.
You can’t perform that action at this time.
0 commit comments