]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-34804: [doc] Rephrase section on side effects in functional.rst for clarity ...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 6 Oct 2021 15:19:46 +0000 (08:19 -0700)
committerGitHub <noreply@github.com>
Wed, 6 Oct 2021 15:19:46 +0000 (17:19 +0200)
Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
(cherry picked from commit 7af95a1e8097b2aab2cbe8de88727809e745b658)

Co-authored-by: DonnaDia <37962843+DonnaDia@users.noreply.github.com>
Doc/howto/functional.rst

index 74e861480d2ff8873caa78f08c42bddb9be61727..c7f8bc8f17f43be5ed37f509f69bcf1ab0ffe576 100644 (file)
@@ -65,11 +65,10 @@ output must only depend on its input.
 
 Some languages are very strict about purity and don't even have assignment
 statements such as ``a=3`` or ``c = a + b``, but it's difficult to avoid all
-side effects.  Printing to the screen or writing to a disk file are side
-effects, for example.  For example, in Python a call to the :func:`print` or
-:func:`time.sleep` function both return no useful value; they're only called for
-their side effects of sending some text to the screen or pausing execution for a
-second.
+side effects, such as printing to the screen or writing to a disk file. Another
+example is a call to the :func:`print` or :func:`time.sleep` function, neither
+of which returns a useful value. Both are called only for their side effects
+of sending some text to the screen or pausing execution for a second.
 
 Python programs written in functional style usually won't go to the extreme of
 avoiding all I/O or all assignments; instead, they'll provide a