[issue28701] Replace PyUnicode_CompareWithASCIIString with _PyUnicode_EqualToASCIIString
Stefan Krah
report at bugs.python.org
Sat Jan 7 18:30:54 EST 2017
Stefan Krah added the comment:
For the record: This is all that happened in decimal if a) you
pass a legacy string and b) force _PyUnicode_Ready() to throw
a MemoryError:
>>> from decimal import *
>>> import _testcapi
>>> context = Context()
>>> traps = _testcapi.unicode_legacy_string('traps')
>>> getattr(context, traps)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError
Both a) and b) are not trivial to accomplish at all and the result
is completely benign.
----------
nosy: +skrah
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue28701>
_______________________________________
More information about the Python-bugs-list
mailing list