Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ba3ff1b

Browse files
committed
Fix the docstring for sys.getrefcount().
Closes SF bug #571759.
1 parent e36a8e8 commit ba3ff1b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

Python/sysmodule.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,8 +482,9 @@ sys_gettotalrefcount(PyObject *self)
482482
PyDoc_STRVAR(getrefcount_doc,
483483
"getrefcount(object) -> integer\n\
484484
\n\
485-
Return the current reference count for the object. This includes the\n\
486-
temporary reference in the argument list, so it is at least 2."
485+
Return the reference count of object. The count returned is generally\n\
486+
one higher than you might expect, because it includes the (temporary)\n\
487+
reference as an argument to getrefcount()."
487488
);
488489

489490
#ifdef COUNT_ALLOCS

0 commit comments

Comments
 (0)