[pypy-commit] pypy unicode-utf8: fix be8caf00c728 for bytes
mattip
pypy.commits at gmail.com
Mon Dec 24 14:53:24 EST 2018
Author: Matti Picus <matti.picus at gmail.com>
Branch: unicode-utf8
Changeset: r95529:7df64fa7f398
Date: 2018-12-24 21:02 +0200
http://bitbucket.org/pypy/pypy/changeset/7df64fa7f398/
Log: fix be8caf00c728 for bytes
diff --git a/pypy/interpreter/argument.py b/pypy/interpreter/argument.py
--- a/pypy/interpreter/argument.py
+++ b/pypy/interpreter/argument.py
@@ -545,7 +545,10 @@
# note: negative-based indexing from the end
w_name = keyword_names_w[i - len(keywords)]
except IndexError:
- name = '?'
+ if keywords is None:
+ name = '?'
+ else:
+ name = keywords[i]
else:
w_enc = space.newtext(space.sys.defaultencoding)
w_err = space.newtext("replace")
diff --git a/pypy/interpreter/test/test_argument.py b/pypy/interpreter/test/test_argument.py
--- a/pypy/interpreter/test/test_argument.py
+++ b/pypy/interpreter/test/test_argument.py
@@ -54,6 +54,9 @@
pass
class DummySpace(object):
+ class sys:
+ defaultencoding = 'utf-8'
+
def newtuple(self, items):
return tuple(items)
More information about the pypy-commit
mailing list