Re: Stack Overflow moderator “animuson”

Joshua Landau joshua at landau.ws
Sat Jul 20 06:27:01 EDT 2013


On 19 July 2013 23:35, Chris Angelico <rosuav at gmail.com> 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

But when you do it generically, square brackets save you space!

>>> sys.getsizeof((int))
392
>>> sys.getsizeof([int])
80

:D



More information about the Python-list mailing list