[pypy-commit] pypy unicode-utf8: random assert

fijal pypy.commits at gmail.com
Sat Dec 9 09:10:16 EST 2017


Author: fijal
Branch: unicode-utf8
Changeset: r93331:86769d294fd1
Date: 2017-12-09 16:09 +0200
http://bitbucket.org/pypy/pypy/changeset/86769d294fd1/

Log:	random assert

diff --git a/pypy/module/unicodedata/interp_ucd.py b/pypy/module/unicodedata/interp_ucd.py
--- a/pypy/module/unicodedata/interp_ucd.py
+++ b/pypy/module/unicodedata/interp_ucd.py
@@ -75,6 +75,7 @@
         except KeyError:
             msg = space.mod(space.newtext("undefined character name '%s'"), space.newtext(name))
             raise OperationError(space.w_KeyError, msg)
+        assert code >= 0
         return space.newutf8(unichr_as_utf8(code), 1)
 
     def name(self, space, w_unichr, w_default=None):


More information about the pypy-commit mailing list