Message166517
| Author |
serhiy.storchaka |
| Recipients |
asvetlov, gregory.p.smith, jcea, loewis, mark.dickinson, meador.inge, serhiy.storchaka, skrah |
| Date |
2012年07月26日.20:29:21 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<201207262327.10259.storchaka@gmail.com> |
| In-reply-to |
<5011A2A3.60202@v.loewis.de> |
| Content |
> Note that object.__sizeof__ does something slightly different, though:
> it uses basicsize (which may or may not contain the sizeof() invocation
> of the correct C structure), and it considers tp_itemsize (which may or
> may not have a correct value).
All such cases are bugs (memory manager works with tp_basicsize and
tp_itemsize, not with __sizeof__ result) and tests do not test it. In
paranoidal mode we should tests both __sizeof__ and object.__sizeof__. For all
classes, even for those that do not use the extra memory. I think it is really
tedious. |
|