Skip to content

Commit 7af95a1

Browse files
DonnaDiaambv
andauthored
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity (GH-27989)
Co-authored-by: Łukasz Langa <[email protected]>
1 parent a7252f8 commit 7af95a1

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

Doc/howto/functional.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ output must only depend on its input.
6565

6666
Some languages are very strict about purity and don't even have assignment
6767
statements such as ``a=3`` or ``c = a + b``, but it's difficult to avoid all
68-
side effects. Printing to the screen or writing to a disk file are side
69-
effects, for example. For example, in Python a call to the :func:`print` or
70-
:func:`time.sleep` function both return no useful value; they're only called for
71-
their side effects of sending some text to the screen or pausing execution for a
72-
second.
68+
side effects, such as printing to the screen or writing to a disk file. Another
69+
example is a call to the :func:`print` or :func:`time.sleep` function, neither
70+
of which returns a useful value. Both are called only for their side effects
71+
of sending some text to the screen or pausing execution for a second.
7372

7473
Python programs written in functional style usually won't go to the extreme of
7574
avoiding all I/O or all assignments; instead, they'll provide a

0 commit comments

Comments
 (0)