Skip to content

Commit 17d951a

Browse files
committed
Fix typos
1 parent 2f2082f commit 17d951a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

peps/pep-0824.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ See the `Specification`_ section for more details.
4141
Motivation
4242
==========
4343

44-
First officially proposed ten years ago in (the now deferred) :pep:`505`
44+
First officially proposed ten years ago in (the now deferred) :pep:`505`,
4545
the idea to add coalescing operators has been along for some time now,
4646
discussed at length in numerous threads, most recently in
4747
[#discuss_revisit_505]_. This PEP aims to capture the current state of
@@ -76,7 +76,7 @@ option is a conditional statement:
7676
s = "fallback"
7777
print(f"The value is {s.lower()}")
7878
79-
While the intend is quite clear, the conditional statement is verbose
79+
While the intent is quite clear, the conditional statement is verbose
8080
and often requires repeating the variable expression. An common
8181
alternative is the conditional expression:
8282

@@ -131,7 +131,7 @@ values other then ``None``, too. Common ones include ``0``, ``""``,
131131
The "``None`` coalescing" operator can bridge this gab by adding an
132132
alternative to ``or`` which explicitly checks only for ``None`` values.
133133
Adding ``??`` can keep the expression concise while clearly
134-
communicating the intend:
134+
communicating the intent:
135135

136136
::
137137

@@ -153,7 +153,7 @@ overwrite the "old" ``None`` value.
153153
val = "fallback"
154154
print(f"The value is {val.lower()}")
155155
156-
A new ``?=`` operator is introduced to make these conditional
156+
A new ``??=`` operator is introduced to make these conditional
157157
assignments easier.
158158

159159
::
@@ -196,8 +196,8 @@ Precedence
196196

197197
The precedence of ``??`` will be between ``or`` and conditional
198198
expressions. Parentheses can be added as necessary to modify the
199-
precedence in individual expressions. A few examples how implicit
200-
parentheses would be placed:
199+
precedence in individual expressions. A few examples of how
200+
implicit parentheses would be placed:
201201

202202
::
203203

@@ -425,20 +425,20 @@ Proliferation of ``None`` in code bases
425425
---------------------------------------
426426

427427
One of the reasons why :pep:`505` stalled was that some expressed their
428-
concern how coalescing and ``None``-aware operators will effect the code
428+
concern how coalescing and ``None``-aware operators will affect the code
429429
written by developers. If it is easier to work with ``None`` values,
430430
this will encourage developers to use them more. They believe that
431431
e.g. returning an optional ``None`` value from a function is usually an
432432
anti-pattern. In an ideal world the use of ``None`` would be limited as
433433
much as possible, for example with early data validation.
434434

435-
It is certainly true that new language features effect how the language
435+
It is certainly true that new language features affect how the language
436436
as a whole develops. Therefore any changes should be considered carefully.
437437
However, just because ``None`` represents an anti-pattern for some, has
438438
not prevented the community as a whole from using it extensively. Rather
439439
the lack of coalescing operators has stopped developers from writing
440440
concise expressions and instead often leads to more complex code or such
441-
which can contain subtly errors, see the `Motivation`_ section for more
441+
which can contain subtle errors, see the `Motivation`_ section for more
442442
details.
443443

444444
``None`` is not special enough

0 commit comments

Comments
 (0)