[docs] [issue10994] implementation details in sys module

Armin Rigo report at bugs.python.org
Fri Feb 4 17:22:14 CET 2011

Armin Rigo <arigo at users.sourceforge.net> added the comment:

Martin: I kind of agree with you, although I guess that for pratical reasons if you don't have a reasonable sys.getsizeof() implementation then it's better to raise TypeError than return 0 (like CPython, which may raise "TypeError: Type %.100s doesn't define __sizeof__").

I agree that it's not really useful to mark functions as CPython-specific in the documentation, if only because whenever a new implementation like PyPy comes along, then it's going to have a rather different set of functions that it wants to consider implementation details.  I would say that more than half the functions in the sys module marked CPython-specific in the doc are implemented in PyPy just fine, and there is an equal number of functions not marked CPython-specific that have no chance to be implemented in PyPy.


Python tracker <report at bugs.python.org>

More information about the docs mailing list