Meador Inge added the comment: On Sat, Jul 28, 2012 at 3:27 AM, Serhiy Storchaka <rep...@bugs.python.org> wrote:
> Serhiy Storchaka <storch...@gmail.com> added the comment: > >> issue15456 >> efficiently demonstrates that the current style can detect bugs >> which testing with object.__sizeof__ can't. > > Hmm, I see this as a counterexample. The bug *was not detected* with the > current style of testing. I disagree. It wasn't *directly* detected -- the test broke because of the new structure field that was added and not because of the new dynamic memory allocation that was added. Even so, the fact that the test broke *at all* should have thrown a warning flag up in the developer's mind to reevaluate how the size is calculated. If the test were written using your object.__sizeof__ method, then the test would not have broken *at all* and therefore it might not have even crossed the developers mind to verify whether the sizeof calculation is correct. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15402> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com