Browse Source

Enum

pull/140/head
Jure Šorn 1 year ago
parent
commit
6ec4eb66e6
2 changed files with 2 additions and 0 deletions
  1. 1
      README.md
  2. 1
      index.html

1
README.md

@ -1331,6 +1331,7 @@ class <enum_name>(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
<member> = <enum>.<member_name> # Returns a member.

1
index.html

@ -1147,6 +1147,7 @@ Hello World!
<ul>
<li><strong>If there are no numeric values before auto(), it returns 1.</strong></li>
<li><strong>Otherwise it returns an increment of the last numeric value.</strong></li>
<li><strong>Accessing a member named after a reserved keyword causes SyntaxError.</strong></li>
</ul>
<pre><code class="python language-python hljs">&lt;member&gt; = &lt;enum&gt;.&lt;member_name&gt; <span class="hljs-comment"># Returns a member.</span>
&lt;member&gt; = &lt;enum&gt;[<span class="hljs-string">'&lt;member_name&gt;'</span>] <span class="hljs-comment"># Returns a member or raises KeyError.</span>

Loading…
Cancel
Save