You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use standard terminology in class pattern error message #144702
When trying to use a class pattern to match on a non-class object, we currently get the following error message:
Traceback (most recent call last):
File "/tmp/test.py", line 2, in <module>
case len():
~~~^^
TypeError: called match pattern must be a class
The terminology "called match pattern" here is a bit confusing. It's not used anywhere else as far as I can tell, and for a beginner, it might read like something is actually being called here.
The documentation consistently refers to these patterns as "class patterns":
Activity
gh-144702: Use standard terminology in class pattern error message (#…
pythongh-144702: Use standard terminology in class pattern error mess…
pythongh-144702: Use standard terminology in class pattern error mess…