Home
last modified time | relevance | path

Searched refs:__match_args__ (Results 1 – 14 of 14) sorted by relevance

/third_party/python/Lib/test/
Dtest_structseq.py128 self.assertEqual(time.struct_time.__match_args__, expected_args)
134 self.assertEqual(os.stat_result.__match_args__, expected_args)
Dtest_patma.py2117 __match_args__ = ("a", "b") variable in TestPatma.test_patma_200.Class
2130 __match_args__ = ("a", "b") variable in TestPatma.test_patma_201.Class
2143 __match_args__ = "a", "b" variable in TestPatma.test_patma_202.Parent
2145 __match_args__ = ("c", "d") variable in TestPatma.test_patma_202.Child
2158 __match_args__ = ("a", "b") variable in TestPatma.test_patma_203.Parent
2160 __match_args__ = "c", "d" variable in TestPatma.test_patma_203.Child
2944 __match_args__ = () variable in TestTypeErrors.test_accepts_positional_subpatterns_0.Class
2966 __match_args__ = ("a", "a") variable in TestTypeErrors.test_got_multiple_subpatterns_for_attribute_0.Class
2980 __match_args__ = ("a",) variable in TestTypeErrors.test_got_multiple_subpatterns_for_attribute_1.Class
2994 __match_args__ = (None,) variable in TestTypeErrors.test_match_args_elements_must_be_strings.Class
[all …]
Dtest_dataclasses.py3582 self.assertEqual(C(42).__match_args__, ('a',))
3589 __match_args__ = ma variable in TestMatchArgs.test_explicit_match_args.C
3590 self.assertIs(C(42).__match_args__, ma)
3598 self.assertEqual(X.__match_args__, ("a", "b", "c"))
3609 __match_args__ = ('b',) variable in TestMatchArgs.test_match_args_argument.Y
3610 self.assertEqual(Y.__match_args__, ('b',))
3615 self.assertEqual(Z.__match_args__, ('b',))
3626 self.assertEqual(B.__match_args__, ('a', 'z'))
3630 self.assertEqual(C.__match_args__, ('x', 'y'))
3633 self.assertEqual(C.__match_args__, ('x', 'y'))
[all …]
Dtest_ast.py276 self.assertEqual(ast_node._fields, ast_node.__match_args__)
Dtest_collections.py697 self.assertEqual(Point.__match_args__, ('x', 'y'))
/third_party/python/Include/internal/
Dpycore_ast_state.h149 PyObject *__match_args__; member
/third_party/python/Doc/reference/
Dcompound_stmts.rst1035 patterns using the :data:`~object.__match_args__` attribute on the class
1038 I. The equivalent of ``getattr(cls, "__match_args__", ())`` is called.
1045 * If there are more positional patterns than ``len(cls.__match_args__)``,
1049 using ``__match_args__[i]`` as the keyword. ``__match_args__[i]`` must
1081 * convert ``P1`` to a keyword pattern using ``CLS.__match_args__``
Ddatamodel.rst2754 define a *__match_args__* attribute.
2756 .. data:: object.__match_args__
2761 *__match_args__* as the keyword. The absence of this attribute is equivalent to
2764 For example, if ``MyClass.__match_args__`` is ``("left", "center", "right")`` that means
2767 of elements in *__match_args__*; if it is larger, the pattern match attempt will raise
/third_party/python/Doc/library/
Ddataclasses.rst165 ``__match_args__`` tuple will be created from the list of
168 ``__match_args__`` is already defined in the class, then
169 ``__match_args__`` will not be generated.
/third_party/python/Misc/NEWS.d/
D3.10.0b1.rst427 :data:`~object.__match_args__` is no longer allowed to be a list.
841 __match_args__ generation.
992 Fix an issue where :data:`~object.__match_args__` generation could fail for
D3.10.0a7.rst218 Add ``__match_args__`` to :c:type:`structsequence` based classes. Patch by
/third_party/python/Doc/tutorial/
Dcontrolflow.rst326 position for attributes in patterns by setting the ``__match_args__`` special
/third_party/python/Python/
DPython-ast.c163 Py_CLEAR(state->__match_args__); in _PyAST_Fini()
275 if ((state->__match_args__ = PyUnicode_InternFromString("__match_args__")) == NULL) return 0; in init_identifiers()
938 state->__match_args__, fnames, in make_type()
/third_party/python/Doc/whatsnew/
D3.10.rst575 position for attributes in patterns by setting the ``__match_args__`` special