Skip to content

Commit 33f6e7c

Browse files
committed
Clean up some comments
1 parent f697036 commit 33f6e7c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Python/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,6 +2004,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, InterpreterFrame *frame, int thr
20042004
PyObject *divisor = POP();
20052005
PyObject *dividend = TOP();
20062006
PyObject *res;
2007+
// NOTE: This optimization keeps us from rolling modulation into
2008+
// BINARY_OP/INPLACE_OP. Once we start specializing those, we can
2009+
// get rid of BINARY_MODULO/INPLACE_MODULO and implement this trick
2010+
// as a specialized variant.
20072011
if (PyUnicode_CheckExact(dividend) && (
20082012
!PyUnicode_Check(divisor) || PyUnicode_CheckExact(divisor))) {
20092013
// fast path; string formatting, but not if the RHS is a str subclass

Python/compile.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3708,7 +3708,7 @@ addop_binary(struct compiler *c, operator_ty binop, bool inplace)
37083708
ADDOP(c, inplace ? INPLACE_MODULO : BINARY_MODULO);
37093709
return 1;
37103710
case Pow:
3711-
// Exponentiation is techncally ternary:
3711+
// Exponentiation is technically ternary:
37123712
ADDOP(c, inplace ? INPLACE_POWER : BINARY_POWER);
37133713
return 1;
37143714
case LShift:

0 commit comments

Comments
 (0)