[Python-ideas] isascii()/islatin1()/isbmp()
Serhiy Storchaka
storchaka at gmail.com
Sat Jun 30 19:02:47 CEST 2012
On 30.06.12 19:43, Antoine Pitrou wrote:
> Because it's really an implementation detail. We don't want to carry
> around such a legacy.
> Besides, we don't know the max code point for sure, only an upper bound
> of it (and, implicitly, also a lower bound).
>
> So while I'm -0 on the methods (calling encode() is as simple), I'm -1
> on max_code_point.
Thanks, Antoine. This objection also just occurred to me. We cannot
guarantee that isascii() always will be O(1). Several enchantments have
already been rejected for this reason. If an extension author wants to
take advantage of CPython, he should use CPython's C API.
More information about the Python-ideas
mailing list