mirror of
https://github.com/python/cpython.git
synced 2025-08-29 21:25:01 +00:00
bpo-45636: Remove the old %-formatting fast-path (GH-29532)
This commit is contained in:
parent
822c3dcce3
commit
ec382fac0d
3 changed files with 10 additions and 12 deletions
|
@ -4711,14 +4711,6 @@ check_eval_breaker:
|
|||
res = PyNumber_Multiply(lhs, rhs);
|
||||
break;
|
||||
case NB_REMAINDER:
|
||||
if (PyUnicode_CheckExact(lhs) &&
|
||||
(!PyUnicode_Check(rhs) || PyUnicode_CheckExact(rhs)))
|
||||
{
|
||||
// bpo-28598: Fast path for string formatting (but not
|
||||
// if the RHS is a str subclass).
|
||||
res = PyUnicode_Format(lhs, rhs);
|
||||
break;
|
||||
}
|
||||
res = PyNumber_Remainder(lhs, rhs);
|
||||
break;
|
||||
case NB_OR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue