summaryrefslogtreecommitdiff
path: root/Doc
diff options
context:
space:
mode:
authorRobert Schuppenies <okkotonushi@googlemail.com>2008-06-01 16:16:17 +0000
committerRobert Schuppenies <okkotonushi@googlemail.com>2008-06-01 16:16:17 +0000
commit51df0647672bc758da6d58eecfe45da9dc5913df (patch)
tree3cb568af01a3310eda4e1647901cd5ac3df118fb /Doc
parent6495c8da8f945def4749192b0536c1678f208664 (diff)
downloadcpython-git-51df0647672bc758da6d58eecfe45da9dc5913df.tar.gz
Issue #2898: Added sys.getsizeof() to retrieve size of objects in bytes.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/sys.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst
index 390f73df65..2e396333dd 100644
--- a/Doc/library/sys.rst
+++ b/Doc/library/sys.rst
@@ -409,6 +409,16 @@ always available.
:func:`setrecursionlimit`.
+.. function:: getsizeof(object)
+
+ Return the size of an object in bytes. The object can be any type of
+ object. All built-in objects will return correct results, but this
+ does not have to hold true for third-party extensions as it is implementation
+ specific.
+
+ .. versionadded:: 2.6
+
+
.. function:: _getframe([depth])
Return a frame object from the call stack. If optional integer *depth* is