Skip to content

Commit 4fec34d

Browse files
committed
Double backslash
1 parent d84a5ae commit 4fec34d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/faq/programming.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ Why does -22 // 10 return -3 instead of -2?
831831
A non-integral float, such as ``x = -22 / 10``, can be converted to an int
832832
with either :meth:`math.trunc` or :meth:`math.floor`, giving -2 or -3.
833833
Maintaining the desired invariant ``i == (i // j) * j + (i % j)`` requires
834-
that the choice for integer division (`//`) match the choice for which of
834+
that the choice for integer division (``//``) match the choice for which of
835835
``i`` or ``j`` determines the sign of ``i % j``. For -22 and 10, ``-2*10 + (-2) ==
836836
-3*10 + 8 == -22``. Some languages choose truncation for int division
837837
and hence modulo sign determination by ``i``.

0 commit comments

Comments
 (0)