diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-02-26 18:55:48 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-02-26 18:55:48 (GMT) |
commit | efb06b0d91a6f7f4a34bd2dc46f4afbffdf49e0e (patch) | |
tree | 5ab5f2a98bec4f2f164928aace5e47a7cc810736 /Python | |
parent | e3a29806449132490029fafa4cc1349d9d4077a8 (diff) | |
download | cpython-efb06b0d91a6f7f4a34bd2dc46f4afbffdf49e0e.zip cpython-efb06b0d91a6f7f4a34bd2dc46f4afbffdf49e0e.tar.gz cpython-efb06b0d91a6f7f4a34bd2dc46f4afbffdf49e0e.tar.bz2 |
Merged revisions 69811,69947 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r69811 | collin.winter | 2009-02-20 13:30:41 -0600 (Fri, 20 Feb 2009) | 2 lines
Issue 5176: special-case string formatting in BINARY_MODULO implementation. This shows a modest (1-3%) speed-up in templating systems, for example.
........
r69947 | jeffrey.yasskin | 2009-02-24 16:48:34 -0600 (Tue, 24 Feb 2009) | 3 lines
Tools/scripts/analyze_dxp.py, a module with some helper functions to
analyze the output of sys.getdxp().
........
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index d1d6d1d..e693147 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1446,7 +1446,10 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) TARGET(BINARY_MODULO) w = POP(); v = TOP(); - x = PyNumber_Remainder(v, w); + if (PyUnicode_CheckExact(v)) + x = PyUnicode_Format(v, w); + else + x = PyNumber_Remainder(v, w); Py_DECREF(v); Py_DECREF(w); SET_TOP(x); |