Author: Richard Plangger <[email protected]>
Branch: py3.5
Changeset: r88955:aad77a92e084
Date: 2016-12-07 17:31 +0100
http://bitbucket.org/pypy/pypy/changeset/aad77a92e084/
Log: translation fix, w_name._value would deduce that the attr _value
could also be SomeString not only SomeUnicodeString
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
@@ -1062,7 +1062,7 @@
if not space.isinstance_w(w_name, space.w_text):
raise oefmt(space.w_TypeError,
"__slots__ items must be strings, not '%T'", w_name)
- if not _isidentifier(w_name._value):
+ if not _isidentifier(space.unicode_w(w_name)):
raise oefmt(space.w_TypeError, "__slots__ must be identifiers")
return w_name.identifier_w(space)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit