Martin v. Löwis added the comment:

I disagree that sizeof cannot work well for variable-sized types. It works very 
well for strings, lists, tuple, dicts, and other "regular" containers. I agree 
that it is not important that it is absolutely correct (in some sense) for 
every object, but it shouldn't lose "big" chunks of data. A bug where it misses 
four bytes is much less important than a bug where it misses N bytes (for an 
object-specific value N that can grow indefinitely).

As for the specific patch, I don't think any action should be taken before the 
3.3 release. I would personally prefer if the computations where done in 
Py_ssize_t, not PyObject* (i.e. the result of the recursive call should be 
unwrapped).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15490>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to