[Python-ideas] Add "has_surrogates" flags to string object

Serhiy Storchaka storchaka at gmail.com
Tue Oct 8 18:21:57 CEST 2013


08.10.13 15:23, Victor Stinner написав(ла):
> I like the idea. I prefer to add another flag (1 bit), instead of
> having a complex with 4 different values.

We need at least 3-states value: yes, no, may be. But combining with 
is_ascii flag we need only one additional bit. I think that it shouldn't 
be more complex.

> Your idea looks specific to the PEP 393, so I prefer to keep the flag
> private. Otherwise it would be hard for other implementations of
> Python to implement the function getting the flag value.

Yes, of course.




More information about the Python-ideas mailing list