diff --git a/peps/pep-0802.rst b/peps/pep-0802.rst index fc27d63782c..45379f8380b 100644 --- a/peps/pep-0802.rst +++ b/peps/pep-0802.rst @@ -145,7 +145,7 @@ Backwards Compatibility Code that relies on the ``repr()`` or ``str()`` of the empty set will no longer work, because the representation will change. -There will be no other backwards incompatibile changes, +There will be no other backwards incompatible changes, all current constructors for the empty set will continue to work, and the behaviour of the :py:class:`set` type will remain unchanged. @@ -168,7 +168,7 @@ How to Teach This All users can be taught that ``{/}`` is the new spelling for ``set()``, and that it is equivalent in all other ways. To help reinforce this, we will update the documentation to use ``{/}`` -instead of ``set()``, including the tutorial, standard libary modules, +instead of ``set()``, including the tutorial, standard library modules, and the Python Language Reference. For new users, sets can be introduced through syntax, noting that the four @@ -246,7 +246,7 @@ This removes agency from the learner. Especially when using a programming language that can execute arbitrary code, it is important that users understand what the code they are writing does. -In the authors' opinion, it would be a misttep to promote ``{*()}`` +In the authors' opinion, it would be a misstep to promote ``{*()}`` as the syntax for an empty set. It resulted as a side-effect of :pep:`448`, rather than an intentional attempt to design a syntax that is easy to teach, understand, and explain. @@ -261,10 +261,10 @@ The authors prefer ``{/}`` due to the resemblance to :math:`\emptyset`. Use the ``(/)`` syntax ---------------------- -This notation has been suggested as a better visual resemlence of +This notation has been suggested as a better visual resemblance of the empty set symbol (e.g. U+2205 ∅ EMPTY SET). However, it is a complete departure from the regular set syntax. -To the authors, any of the proposed notations with curly brackets +To the authors, any of the proposed notations with curly braces are better than this proposal, as they are more consistent with the current (since Python 3.0) set notation. @@ -288,12 +288,11 @@ for all empty collections. Create and use a new token for ``'{/}'`` ---------------------------------------- -There have been `previous proposals `__ -to create a new token for this construct. -This would require ``'{/}'`` to be written literally, -with no whitespace between the characters. +There have been `previous discussions `__ +on whether to create a new token for this construct. This would require +``'{/}'`` to be written literally, with no whitespace between the characters. -We insted chose to allow whitespace between the brackets and the slash, +We choose to allow whitespace between the braces and the slash, treating ``{``, ``/``, and ``}`` as three distinct tokens, as we cannot see any reason to prevent it. However, we expect that the vast majority of uses will not include whitespace.