Skip to content

Commit 008ba3a

Browse files
committed
Mention pitfails of c_div() implementation
1 parent 4949f85 commit 008ba3a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

peps/pep-0791.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ and issue `python/cpython#81313
8181
* ``c_div()`` and ``n_div()`` --- for integer division with rounding towards
8282
positive infinity (ceiling divide) and to the nearest integer, see `relevant
8383
discussion thread <https://discuss.python.org/t/91269>`_. This is reinvented
84-
several times in the stdlib, e.g. in :mod:`datetime` and
85-
:mod:`fractions`.
84+
several times in the stdlib, e.g. in :mod:`datetime` and :mod:`fractions`.
85+
And it's easy to do this wrongly, as demonstrated by the thread.
8686
* ``gcdext()`` --- to solve linear `Diophantine equation
8787
<https://en.wikipedia.org/wiki/Diophantine_equation>`_ in two variables (the
8888
:external+py3.14:class:`int` implementation actually includes an extended

0 commit comments

Comments
 (0)