From 01de90e3f2718f1337d2a7aae805d33b550da8d0 Mon Sep 17 00:00:00 2001 From: Vladislav Merkulov <150796351+merkulovlad@users.noreply.github.com> Date: Wed, 18 Mar 2026 00:06:34 +0300 Subject: [PATCH] gh-146086: Clarify sys.getsizeof() docstring regarding additional overhead --- Python/sysmodule.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Python/sysmodule.c b/Python/sysmodule.c index 646b8a1c3c3a84..c84d62010f0bc9 100644 --- a/Python/sysmodule.c +++ b/Python/sysmodule.c @@ -2006,7 +2006,8 @@ sys_getsizeof(PyObject *self, PyObject *args, PyObject *kwds) PyDoc_STRVAR(getsizeof_doc, "getsizeof(object [, default]) -> int\n\ \n\ -Return the size of object in bytes."); +Return the size of object in bytes.\n\ +The result may include additional memory overhead (e.g., for the garbage collector)."); /*[clinic input] sys.getrefcount -> Py_ssize_t