From f2b1e8ab1fe88ec1f39a844d1cc031fe9912ac23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 22 Aug 2024 16:57:40 +0200 Subject: [PATCH] Match statement --- README.md | 2 +- index.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fbd6475..d248e84 100644 --- a/README.md +++ b/README.md @@ -2204,8 +2204,8 @@ match : = () # Matches any object of that type. = _ # Matches any object. = # Matches any object and binds it to name. - = | [| ...] # Matches any of the patterns. = as # Binds match to name. Also (). + = | [| ...] # Matches any of the patterns. = [, ...] # Matches sequence with matching items. = {: , ...} # Matches dictionary with matching items. = (=, ...) # Matches object with matching attributes. diff --git a/index.html b/index.html index 778fc04..076d52d 100644 --- a/index.html +++ b/index.html @@ -1808,8 +1808,8 @@ first_element = op.methodcaller('pop', # Matches any object of that type. <wildcard_patt> = _ # Matches any object. <capture_patt> = <name> # Matches any object and binds it to name. -<or_pattern> = <pattern> | <pattern> [| ...] # Matches any of the patterns. <as_pattern> = <pattern> as <name> # Binds match to name. Also <type>(<name>). +<or_pattern> = <pattern> | <pattern> [| ...] # Matches any of the patterns. <sequence_patt> = [<pattern>, ...] # Matches sequence with matching items. <mapping_patt> = {<value_pattern>: <patt>, ...} # Matches dictionary with matching items. <class_pattern> = <type>(<attr_name>=<patt>, ...) # Matches object with matching attributes.