➜

This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ramalho
Recipients docs@python, ramalho
Date 2021-03-02.21:29:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614720567.85.0.819945578913.issue43378@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-03-02 21:29:27ramalhosetrecipients: + ramalho, docs@python
2021-03-02 21:29:27ramalhosetmessageid: <1614720567.85.0.819945578913.issue43378@roundup.psfhosted.org>
2021-03-02 21:29:27ramalholinkissue43378 messages
2021-03-02 21:29:27ramalhocreate