File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -492,10 +492,10 @@ as follows:
492
492
the entire subject; for these types no keyword patterns are accepted.
493
493
- The equivalent of ``getattr(cls, "__match_args__", ())) `` is called.
494
494
- If this raises an exception the exception bubbles up.
495
- - If the returned value is not a list or tuple, the conversion fails
495
+ - If the returned value is not a tuple, the conversion fails
496
496
and ``TypeError `` is raised.
497
497
- If there are more positional patterns than the length of
498
- ``__match_args__` `` (as obtained using ``len() ``), ``TypeError `` is raised.
498
+ ``__match_args__ `` (as obtained using ``len() ``), ``TypeError `` is raised.
499
499
- Otherwise, positional pattern ``i `` is converted to a keyword pattern
500
500
using ``__match_args__[i] `` as the keyword,
501
501
provided it the latter is a string;
@@ -513,7 +513,7 @@ positional subpatterns is different:
513
513
This behavior is roughly equivalent to the following::
514
514
515
515
class C:
516
- __match_args__ = [ "__match_self_prop__"]
516
+ __match_args__ = ( "__match_self_prop__",)
517
517
@property
518
518
def __match_self_prop__(self):
519
519
return self
You can’t perform that action at this time.
0 commit comments