bpo-45636: Remove the old %-formatting fast-path (GH-29532)

This commit is contained in:
Brandt Bucher 2021-11-15 08:58:23 -08:00 committed by GitHub
parent 822c3dcce3
commit ec382fac0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 12 deletions

View file

@ -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: