Stack Overflow moderator “animuson”

Dave Angel davea at davea.name
Sat Jul 20 01:14:06 CEST 2013


On 07/19/2013 06:35 PM, Chris Angelico wrote:
> On Sat, Jul 20, 2013 at 4:54 AM,  <wxjmfauth at gmail.com> wrote:
>> And do not forget memory. The €uro just become expensive.
>>
>>>>> sys.getsizeof('
>> )
>> 26
>>>>> sys.getsizeof('€')
>> 40
>>
>> I do not know. When an €uro char need 14 bytes more that
>> a dollar, I belong to those who thing there is a problem
>> somewhere.
>
> Oh, I totally agree. But it's not just the Euro symbol that's
> expensive. Look how much I have to pay for a couple of square
> brackets!
>
>>>> sys.getsizeof((1))
> 14
>>>> sys.getsizeof([1])
> 40
>

And look how much a comma costs us (on 64bit 3.3):

 >>> sys.getsizeof((1))
28
 >>> sys.getsizeof((1,))
64
 >>> sys.getsizeof([1])
80

;-)


-- 
DaveA




More information about the Python-list mailing list