Message387973
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 (that may be overloaded), but inside a match clause has this special meaning without any overloading.
I believe this exception should be made explicit in section 4.6, otherwise it may lead readers of the tutorial to a misconception. |
|
Date |
User |
Action |
Args |
2021-03-02 21:29:27 | ramalho | set | recipients:
+ ramalho, docs@python |
2021-03-02 21:29:27 | ramalho | set | messageid: <1614720567.85.0.819945578913.issue43378@roundup.psfhosted.org> |
2021-03-02 21:29:27 | ramalho | link | issue43378 messages |
2021-03-02 21:29:27 | ramalho | create | |
|