Finding size of Variable

wxjmfauth at gmail.com wxjmfauth at gmail.com
Thu Feb 6 15:15:51 CET 2014


Some mysterious problem with the "euro".
Let's take a real "French" char.
>>> sys.getsizeof('abc' + 'œ')
46
>>> sys.getsizeof(('abc' + 'œ').encode('utf-32'))
37

or a "German" char, ẞẞẞẞẞ

>>> sys.getsizeof('abc' + '\N{LATIN CAPITAL LETTER SHARP S}')
46
>>> sys.getsizeof(('abc' + '\N{LATIN CAPITAL LETTER SHARP S}').encode('utf-32'))
37






More information about the Python-list mailing list