Oh look, another language (ceylon)

Mark Lawrence breamoreboy at yahoo.co.uk
Mon Nov 18 04:56:11 EST 2013


On 18/11/2013 09:44, wxjmfauth at gmail.com wrote:
> character
> Satisfied Interfaces: Comparable<Character>, Enumerable<Character>, Ordinal<Other>
> A 32-bit Unicode character.
> Satisfied Interfaces: Category, Cloneable<List<Element>>, Collection<Element>,
> Comparable<String>, Correspondence<Integer,Element>, Iterable<Element,Null>,
> List<Character>, Ranged<Integer,String>, Summable<String>
>
>
> string
> Satisfied Interfaces: Category, Cloneable<List<Element>>, Collection<Element>,
> Comparable<String>, Correspondence<Integer,Element>, Iterable<Element,Null>,
> List<Character>, Ranged<Integer,String>, Summable<String>
> A string of characters. Each character in the string is a 32-bit Unicode
> character. The internal UTF-16 encoding is hidden from clients.
> A string is a Category of its Characters, and of its substrings:
>
>
> Clean. Far, far away from a unicode handling which may require
> 18 bytes (!) more to encode a non ascii n-chars string than a
> ascii n-chars string.
> (With performances following expectedly "globally" the same logic)
>
>>>> sys.getsizeof('a')
> 26
>>>> sys.getsizeof('\U0001d11e')
> 44
>
>
> jmf
>

In [3]: sys.getsizeof(1)
Out[3]: 14

What a disaster, 13 bytes wasted storing 1.  I'll just rush off to the 
bug tracker and raise an issue to get the entire Cpython core rewritten 
before Armaggeddon strikes.

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence




More information about the Python-list mailing list