This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | schuppenies |
|---|---|
| Recipients | amaury.forgeotdarc, benjamin.peterson, facundobatista, schuppenies |
| Date | 2008年07月03日.13:31:45 |
| SpamBayes Score | 0.061934482 |
| Marked as misclassified | No |
| Message-id | <1215091909.2.0.533078295728.issue3122@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Amaury, I was testing your patch and it turns out, that it will ignore any __sizeof__ attribute which may be available through getattr. I adapted it a bit, so now getsizeof will try to call the method on the passed object first, and if it fails or the object is a type, the code proposed by you will be executed. This also deals with old-style class instances. The match_sizeof function in the patch is just to showcase the example. What do you think? |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年07月03日 13:31:49 | schuppenies | set | spambayes_score: 0.0619345 -> 0.061934482 recipients: + schuppenies, facundobatista, amaury.forgeotdarc, benjamin.peterson |
| 2008年07月03日 13:31:49 | schuppenies | set | spambayes_score: 0.0619345 -> 0.0619345 messageid: <1215091909.2.0.533078295728.issue3122@psf.upfronthosting.co.za> |
| 2008年07月03日 13:31:48 | schuppenies | link | issue3122 messages |
| 2008年07月03日 13:31:48 | schuppenies | create | |