mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-42128: Structural Pattern Matching (PEP 634) (GH-22917)
Co-authored-by: Guido van Rossum <guido@python.org> Co-authored-by: Talin <viridia@gmail.com> Co-authored-by: Pablo Galindo <pablogsal@gmail.com>
This commit is contained in:
parent
cc02b4f2e8
commit
145bf269df
43 changed files with 10867 additions and 2607 deletions
|
|
@ -687,6 +687,10 @@ class TestNamedTuple(unittest.TestCase):
|
|||
self.assertEqual(new_func.__globals__['__builtins__'], {})
|
||||
self.assertEqual(new_func.__builtins__, {})
|
||||
|
||||
def test_match_args(self):
|
||||
Point = namedtuple('Point', 'x y')
|
||||
self.assertEqual(Point.__match_args__, ('x', 'y'))
|
||||
|
||||
|
||||
################################################################################
|
||||
### Abstract Base Classes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue