Armin Rigo <ar...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue10994>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to