mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Update pattern matching docs for changes to the PEP (#25185)
See: - https://github.com/python/peps/pull/1909 (__match_args__ must be a tuple) - https://github.com/python/peps/pull/1908 (allow keyword patterns for int(x) etc.)
This commit is contained in:
parent
57c6cb5100
commit
5143fd15b4
2 changed files with 3 additions and 3 deletions
|
@ -2565,7 +2565,7 @@ define a *__match_args__* attribute.
|
|||
|
||||
.. data:: object.__match_args__
|
||||
|
||||
This class variable can be assigned a tuple or list of strings. When this class is
|
||||
This class variable can be assigned a tuple of strings. When this class is
|
||||
used in a class pattern with positional arguments, each positional argument will
|
||||
be converted into a keyword argument, using the corresponding value in
|
||||
*__match_args__* as the keyword. The absence of this attribute is equivalent to
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue