@@ -41,7 +41,7 @@ See the `Specification`_ section for more details.
4141Motivation
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 `,
4545the idea to add coalescing operators has been along for some time now,
4646discussed 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
8080and often requires repeating the variable expression. An common
8181alternative is the conditional expression:
8282
@@ -131,7 +131,7 @@ values other then ``None``, too. Common ones include ``0``, ``""``,
131131The "``None `` coalescing" operator can bridge this gab by adding an
132132alternative to ``or `` which explicitly checks only for ``None `` values.
133133Adding ``?? `` 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
157157assignments easier.
158158
159159::
@@ -196,8 +196,8 @@ Precedence
196196
197197The precedence of ``?? `` will be between ``or `` and conditional
198198expressions. 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
427427One 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
429429written by developers. If it is easier to work with ``None `` values,
430430this will encourage developers to use them more. They believe that
431431e.g. returning an optional ``None `` value from a function is usually an
432432anti-pattern. In an ideal world the use of ``None `` would be limited as
433433much 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
436436as a whole develops. Therefore any changes should be considered carefully.
437437However, just because ``None `` represents an anti-pattern for some, has
438438not prevented the community as a whole from using it extensively. Rather
439439the lack of coalescing operators has stopped developers from writing
440440concise 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
442442details.
443443
444444``None `` is not special enough
0 commit comments