/third_party/python/Lib/test/ |
D | test_structseq.py | 128 self.assertEqual(time.struct_time.__match_args__, expected_args) 134 self.assertEqual(os.stat_result.__match_args__, expected_args)
|
D | test_patma.py | 2117 __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 …]
|
D | test_dataclasses.py | 3582 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 …]
|
D | test_ast.py | 276 self.assertEqual(ast_node._fields, ast_node.__match_args__)
|
D | test_collections.py | 697 self.assertEqual(Point.__match_args__, ('x', 'y'))
|
/third_party/python/Include/internal/ |
D | pycore_ast_state.h | 149 PyObject *__match_args__; member
|
/third_party/python/Doc/reference/ |
D | compound_stmts.rst | 1035 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__``
|
D | datamodel.rst | 2754 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/ |
D | dataclasses.rst | 165 ``__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/ |
D | 3.10.0b1.rst | 427 :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
|
D | 3.10.0a7.rst | 218 Add ``__match_args__`` to :c:type:`structsequence` based classes. Patch by
|
/third_party/python/Doc/tutorial/ |
D | controlflow.rst | 326 position for attributes in patterns by setting the ``__match_args__`` special
|
/third_party/python/Python/ |
D | Python-ast.c | 163 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/ |
D | 3.10.rst | 575 position for attributes in patterns by setting the ``__match_args__`` special
|