[3.11] gh-101266: Fix __sizeof__ for subclasses of int (GH-101394) (#101579)
Fix the behaviour of the `__sizeof__` method (and hence the results returned by `sys.getsizeof`) for subclasses of `int`. Previously, `int` subclasses gave identical results to the `int` base class, ignoring the presence of the instance dictionary. (Manual backport of #101394 to the Python 3.11 branch.)
M
Mark Dickinson committed
cf89c16486a4cc297413e17d32082ec4f389d725
Parent: 7cbcfbe
Committed by GitHub <noreply@github.com>
on 2/5/2023, 12:18:56 PM