[pypy-commit] pypy py3k: assume text and passthru to getattr
pjenvey
noreply at buildbot.pypy.org
Mon Mar 12 23:37:47 CET 2012
Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r53370:cc2ce7abbd15
Date: 2012-03-12 15:36 -0700
http://bitbucket.org/pypy/pypy/changeset/cc2ce7abbd15/
Log: assume text and passthru to getattr
diff --git a/pypy/module/operator/app_operator.py b/pypy/module/operator/app_operator.py
--- a/pypy/module/operator/app_operator.py
+++ b/pypy/module/operator/app_operator.py
@@ -60,12 +60,10 @@
def single_attr_getter(attr):
if not isinstance(attr, str):
- if not isinstance(attr, str):
- def _raise_typeerror(obj):
- raise TypeError("argument must be a string, not %r" %
- (type(attr).__name__,))
- return _raise_typeerror
- attr = attr.encode('ascii')
+ def _raise_typeerror(obj):
+ raise TypeError("argument must be a string, not %r" %
+ (type(attr).__name__,))
+ return _raise_typeerror
#
def make_getter(name, prevfn=None):
if prevfn is None:
More information about the pypy-commit
mailing list