[pypy-commit] pypy py3k: backout 5226ba3dc28d, I'll try another approach for unicode exception messages
antocuni
noreply at buildbot.pypy.org
Sat Aug 4 15:01:16 CEST 2012
Author: Antonio Cuni <anto.cuni at gmail.com>
Branch: py3k
Changeset: r56567:b8597be87794
Date: 2012-08-04 14:42 +0200
http://bitbucket.org/pypy/pypy/changeset/b8597be87794/
Log: backout 5226ba3dc28d, I'll try another approach for unicode
exception messages
diff --git a/pypy/interpreter/error.py b/pypy/interpreter/error.py
--- a/pypy/interpreter/error.py
+++ b/pypy/interpreter/error.py
@@ -353,12 +353,10 @@
return OpErrFmt, strings
def get_operationerr_class(valuefmt):
- is_unicode = isinstance(valuefmt, unicode)
- key = (is_unicode, valuefmt)
try:
- result = _fmtcache[key]
+ result = _fmtcache[valuefmt]
except KeyError:
- result = _fmtcache[key] = get_operrcls2(valuefmt)
+ result = _fmtcache[valuefmt] = get_operrcls2(valuefmt)
return result
get_operationerr_class._annspecialcase_ = 'specialize:memo'
More information about the pypy-commit
mailing list