"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "Doc/tutorial/datastructures.rst" between
Python-3.9.3.tar.xz and Python-3.9.4.tar.xz

About: Python is an interpreted, interactive, object-oriented programming language. It incorporates modules, exceptions, dynamic typing, very high level dynamic data types, and classes. Newest major release.

datastructures.rst  (Python-3.9.3.tar.xz):datastructures.rst  (Python-3.9.4.tar.xz)
skipping to change at line 642 skipping to change at line 642
.. _tut-conditions: .. _tut-conditions:
More on Conditions More on Conditions
================== ==================
The conditions used in ``while`` and ``if`` statements can contain any The conditions used in ``while`` and ``if`` statements can contain any
operators, not just comparisons. operators, not just comparisons.
The comparison operators ``in`` and ``not in`` check whether a value occurs The comparison operators ``in`` and ``not in`` check whether a value occurs
(does not occur) in a sequence. The operators ``is`` and ``is not`` compare (does not occur) in a sequence. The operators ``is`` and ``is not`` compare
whether two objects are really the same object; this only matters for mutable whether two objects are really the same object. All comparison operators have
objects like lists. All comparison operators have the same priority, which is the same priority, which is lower than that of all numerical operators.
lower than that of all numerical operators.
Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` is Comparisons can be chained. For example, ``a < b == c`` tests whether ``a`` is
less than ``b`` and moreover ``b`` equals ``c``. less than ``b`` and moreover ``b`` equals ``c``.
Comparisons may be combined using the Boolean operators ``and`` and ``or``, and Comparisons may be combined using the Boolean operators ``and`` and ``or``, and
the outcome of a comparison (or of any other Boolean expression) may be negated the outcome of a comparison (or of any other Boolean expression) may be negated
with ``not``. These have lower priorities than comparison operators; between with ``not``. These have lower priorities than comparison operators; between
them, ``not`` has the highest priority and ``or`` the lowest, so that ``A and them, ``not`` has the highest priority and ``or`` the lowest, so that ``A and
not B or C`` is equivalent to ``(A and (not B)) or C``. As always, parentheses not B or C`` is equivalent to ``(A and (not B)) or C``. As always, parentheses
can be used to express the desired composition. can be used to express the desired composition.
 End of changes. 1 change blocks. 
3 lines changed or deleted 2 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)