Author: Matti Picus <[email protected]>
Branch: unicode-utf8-py3
Changeset: r95311:3eafff66d59a
Date: 2018-11-13 00:51 -0800
http://bitbucket.org/pypy/pypy/changeset/3eafff66d59a/
Log: fix copy-paste
diff --git a/pypy/objspace/std/typeobject.py b/pypy/objspace/std/typeobject.py
--- a/pypy/objspace/std/typeobject.py
+++ b/pypy/objspace/std/typeobject.py
@@ -804,7 +804,8 @@
name = space.text_w(w_name)
if '\x00' in name:
raise oefmt(space.w_ValueError, "type name must not contain null
characters")
- if surrogate_in_utf8(name) >= 0:
+ pos = surrogate_in_utf8(name)
+ if pos >= 0:
raise oefmt(space.w_ValueError, "can't encode character %c in position
"
"%i, surrogates not allowed", name[pos], pos)
dict_w = {}
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit