[New-bugs-announce] [issue28098] sys.getsizeof(0) is incorrect

Mark Dickinson report at bugs.python.org
Mon Sep 12 03:59:33 EDT 2016

New submission from Mark Dickinson:

Low-priority issue, possibly not worth fixing at all, but maybe worth recording.

sys.getsizeof(0) currently reports 24 on a 64-bit machine using 30-bit limbs. That's inaccurate, since we're actually allocating 28 bytes for 0 as part of the small-int cache. PyLong_FromLong also always requests at least one limb.

assignee: mark.dickinson
components: Interpreter Core
messages: 275987
nosy: mark.dickinson
priority: low
severity: normal
stage: needs patch
status: open
title: sys.getsizeof(0) is incorrect
type: behavior
versions: Python 3.5, Python 3.6

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list