Author: Matti Picus <matti.pi...@gmail.com> Branch: Changeset: r92122:37e8eeb5775a Date: 2017-08-11 15:47 +0300 http://bitbucket.org/pypy/pypy/changeset/37e8eeb5775a/
Log: document 'default' argument to sys.getsizeof 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 @@ -253,7 +253,13 @@ from rpython.rtyper.lltypesystem import lltype, rffi return space.newint(rffi.cast(lltype.Signed, handle)) -getsizeof_missing = """sys.getsizeof() is not implemented on PyPy. +getsizeof_missing = """getsizeof(...) + getsizeof(object, default) -> int + + Return the size of object in bytes. + +sys.getsizeof(object, default) will always return default on PyPy, and +raise a TypeError if default is not provided. 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 _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit