[issue43378] Pattern Matching section in tutorial refers to | as or

2021-03-03 Thread Raymond Hettinger
Change by Raymond Hettinger : -- nosy: +Daniel Moisset, brandtbucher, gvanrossum, willingc ___ Python tracker ___ ___

[issue43378] Pattern Matching section in tutorial refers to | as or

2021-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Another other thought, PEP 634 defines "|" as being an "or-pattern", so it part of the spec: https://www.python.org/dev/peps/pep-0634/#or-patterns -- ___ Python tracker

[issue43378] Pattern Matching section in tutorial refers to | as or

2021-03-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: This seems fine to me. In pattern matching, it has both the meaning and pronunciation of "or": case "this" | "that": ... It has similar mean in the re module: r'abc|def' And it is also used the same way in typing: s: list | tuple We've

[issue43378] Pattern Matching section in tutorial refers to | as or

2021-03-02 Thread Luciano Ramalho
New submission from Luciano Ramalho : Section 4.6. "match Statements" of the Python 3.10 tutorial says: """ You can combine several literals in a single pattern using | (“or”): """ For someone just learning Python, this may suggest that | is always "or", when in fact it is a bitwise operator

[issue43378] Pattern Matching section in tutorial refers to | as

2021-03-02 Thread Luciano Ramalho
Change by Luciano Ramalho : -- nosy: ramalho priority: normal severity: normal status: open title: Pattern Matching section in tutorial refers to | as ___ Python tracker ___