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.

classification
Title: getsizeof incorrect for Unicode strings
Type: behavior Stage:
Components: Versions:
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: schuppenies Nosy List: loewis, schuppenies
Priority: normal Keywords:

Created on 2008-06-06 07:47 by loewis, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg67750 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2008-06-06 07:47
sys.getsizeof doesn't take the actual length of the Unicode string into
account:

py> sys.getsizeof(u"")
32
[31332 refs]
py> sys.getsizeof(u"1"*100)
32
[31332 refs]
msg68176 - (view) Author: Robert Schuppenies (schuppenies) * (Python committer) Date: 2008-06-13 19:11
Fixed in r64066.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47298
2008-06-13 19:11:33schuppeniessetstatus: open -> closed
resolution: fixed
messages: + msg68176
2008-06-07 12:49:53benjamin.petersonsettype: behavior
2008-06-06 07:47:12loewiscreate