@@ -197,23 +197,24 @@ vulnerability. Markers were first standardised in :pep:`345`. This document
197197fixes some issues that were observed in the design described in :pep: `426 `.
198198
199199Comparisons in marker expressions are based on the types in the table below.
200- The types marked with ``Version `` or ``Version | String `` use the version
200+ The variables marked with ``Version `` or ``Version | String `` use the version
201201comparison rules of the :ref: `Version specifier specification
202202<version-specifiers>` when those are defined (that is when both sides have a
203203valid version specifier). If both sides are not expressible as a ``Version ``,
204204then ``== ``, ``>= ``, and ``<= `` check for exact equality; no ordering is
205- assumed. On the other values , operators perform the same as they do for strings
205+ assumed. On other operators , operators perform the same as they do for strings
206206or sets in Python based on whether the marker value is a string or set itself.
207207Otherwise an error should be raised. e.g. the following will result in errors::
208208
209209 "dog" ~= "fred"
210210 python_version ~= "surprise"
211211
212- Values that are marked as ``String `` may also follow same rules as ``Version ``
213- defined above, with ``>= `` and ``<= `` being equivalent to ``== ``, and ``< `` and
214- ``> `` always evaluating to ``False ``. This is legacy behavior due to an older
215- version of this spec, and tools may choose to warn or fail if these are used on
216- strings.
212+ Variables that are marked solely as ``String `` support `== ` and `!= `; ordered
213+ comparison operators may also follow same rules as ``Version `` defined above
214+ when not a valid Version, with ``>= `` and ``<= `` being equivalent to ``== ``,
215+ and ``< `` and ``> `` always evaluating to ``False ``. This is legacy behavior
216+ due to an older version of this spec, and tools may choose to warn or fail
217+ if orderd comparisons are used on ``String `` markers.
217218
218219User supplied constants are always encoded as strings with either ``' `` or
219220``" `` quote marks. Note that backslash escapes are not defined, but existing
0 commit comments