Skip to content

Commit 50435ef

Browse files
iritkatrielhugovk
andauthored
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent db58d0d commit 50435ef

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

peps/pep-0765.rst

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ Once downloaded, a
185185
was used to construct an AST for each file, and traverse it to identify ``break``,
186186
``continue`` and ``return`` statements which are directly inside a ``finally`` block.
187187

188-
I then found the current source code for each occurence, and categorized it. For
188+
I then found the current source code for each occurrence, and categorized it. For
189189
cases where the code seems incorrect, I created an issue in the project's bug
190190
tracker. The responses to these issues are also part of the data collected in
191191
this investigation.
@@ -257,13 +257,12 @@ Here the intention seems to be to return ``NotImplemented`` when an exception is
257257
raised, but the ``return`` in the ``finally`` block would override the one in the
258258
``except`` block.
259259

260-
> [!NOTE]
261-
> Following the
262-
> `discussion <https://discuss.python.org/t/an-analysis-of-return-in-finally-in-the-wild/70633/15>`__,
263-
> I repeated the analysis on a random selection of PyPI packages (to
264-
> analyze code written by *average* programmers). The sample contained
265-
> in total 77,398,892 lines of code with 316 instances of ``return``/``break``/``continue``
266-
> in ``finally``. So about 4 instances per million lines of code.
260+
.. note:: Following the
261+
`discussion <https://discuss.python.org/t/an-analysis-of-return-in-finally-in-the-wild/70633/15>`__,
262+
I repeated the analysis on a random selection of PyPI packages (to
263+
analyze code written by *average* programmers). The sample contained
264+
in total 77,398,892 lines of code with 316 instances of ``return``/``break``/``continue``
265+
in ``finally``. So about 4 instances per million lines of code.
267266

268267
**Author reactions**
269268

@@ -275,7 +274,7 @@ authors to the problems. Within two weeks, 40 of the 73 issues received a reacti
275274
from the code maintainers:
276275

277276
- 15 issues had a PR opened to fix the problem.
278-
- 20 received reactions acknowleding the problem as one worth looking into.
277+
- 20 received reactions acknowledging the problem as one worth looking into.
279278
- 3 replied that the code is no longer maintained so this won't be fixed.
280279
- 2 closed the issue as "works as intended", one said that they intend to
281280
swallow all exceptions, but the other seemed unaware of the distinction

0 commit comments

Comments
 (0)