On 19 July 2013 23:35, Chris Angelico <ros...@gmail.com> wrote: > On Sat, Jul 20, 2013 at 4:54 AM, <wxjmfa...@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 -- http://mail.python.org/mailman/listinfo/python-list