mirror of
https://github.com/python/cpython.git
synced 2025-07-19 17:25:54 +00:00
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(). ........
This commit is contained in:
parent
e3a2980644
commit
efb06b0d91
4 changed files with 140 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue