New submission from Luciano Ramalho <luci...@ramalho.org>: 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. ---------- assignee: -> docs@python components: +Documentation nosy: +docs@python title: Pattern Matching section in tutorial refers to | as -> Pattern Matching section in tutorial refers to | as or type: -> enhancement versions: +Python 3.10 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43378> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com