Skip to content

Commit 01de90e

Browse files
committed
gh-146086: Clarify sys.getsizeof() docstring regarding additional overhead
1 parent e0f7c10 commit 01de90e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Python/sysmodule.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2006,7 +2006,8 @@ sys_getsizeof(PyObject *self, PyObject *args, PyObject *kwds)
20062006
PyDoc_STRVAR(getsizeof_doc,
20072007
"getsizeof(object [, default]) -> int\n\
20082008
\n\
2009-
Return the size of object in bytes.");
2009+
Return the size of object in bytes.\n\
2010+
The result may include additional memory overhead (e.g., for the garbage collector).");
20102011

20112012
/*[clinic input]
20122013
sys.getrefcount -> Py_ssize_t

0 commit comments

Comments
 (0)