[pypy-commit] pypy default: more docs

arigo pypy.commits at gmail.com
Mon Mar 6 14:14:55 EST 2017


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r90581:508a0ac8cf55
Date: 2017-03-06 20:14 +0100
http://bitbucket.org/pypy/pypy/changeset/508a0ac8cf55/

Log:	more docs

diff --git a/pypy/module/sys/vm.py b/pypy/module/sys/vm.py
--- a/pypy/module/sys/vm.py
+++ b/pypy/module/sys/vm.py
@@ -255,6 +255,14 @@
 
 getsizeof_missing = """sys.getsizeof() is not implemented on PyPy.
 
+First note that the CPython documentation says that this function may
+raise a TypeError, so if you are seeing it, it means that the program
+you are using is not correctly handling this case.
+
+On PyPy, though, it always raises TypeError.  Before looking for
+alternatives, please take a moment to read the following explanation as
+to why it is the case.  What you are looking for may not be possible.
+
 A memory profiler using this function is most likely to give results
 inconsistent with reality on PyPy.  It would be possible to have
 sys.getsizeof() return a number (with enough work), but that may or


More information about the pypy-commit mailing list