From 6ec4eb66e633b430c49ed9639065a6a235b940ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 25 Dec 2022 01:27:35 +0100 Subject: [PATCH] Enum --- README.md | 1 + index.html | 1 + 2 files changed, 2 insertions(+) diff --git a/README.md b/README.md index a4cafad..35ae208 100644 --- a/README.md +++ b/README.md @@ -1331,6 +1331,7 @@ class (Enum): ``` * **If there are no numeric values before auto(), it returns 1.** * **Otherwise it returns an increment of the last numeric value.** +* **Accessing a member named after a reserved keyword causes SyntaxError.** ```python = . # Returns a member. diff --git a/index.html b/index.html index b85fdc7..9340cbf 100644 --- a/index.html +++ b/index.html @@ -1147,6 +1147,7 @@ Hello World!
  • If there are no numeric values before auto(), it returns 1.
  • Otherwise it returns an increment of the last numeric value.
  • +
  • Accessing a member named after a reserved keyword causes SyntaxError.
<member> = <enum>.<member_name>                 # Returns a member.
 <member> = <enum>['<member_name>']              # Returns a member or raises KeyError.