Skip to content

Commit 5abe6e8

Browse files
committed
Inline
1 parent d333be7 commit 5abe6e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -692,7 +692,7 @@ point = Point(0, 0)
692692
```python
693693
from enum import Enum
694694
Direction = Enum('Direction', 'n e s w')
695-
Cutlery = Enum('Cutlery', {'fork': 1, 'knife': 2, 'spoon': 3})
695+
direction = Direction.n
696696
```
697697

698698
```python

index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -680,7 +680,7 @@ <h3 id="namedtupleenumdataclass">Namedtuple, Enum, Dataclass</h3>
680680
</code></pre>
681681
<pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> enum <span class="hljs-keyword">import</span> Enum
682682
Direction = Enum(<span class="hljs-string">'Direction'</span>, <span class="hljs-string">'n e s w'</span>)
683-
Cutlery = Enum(<span class="hljs-string">'Cutlery'</span>, {<span class="hljs-string">'fork'</span>: <span class="hljs-number">1</span>, <span class="hljs-string">'knife'</span>: <span class="hljs-number">2</span>, <span class="hljs-string">'spoon'</span>: <span class="hljs-number">3</span>})
683+
direction = Direction.n
684684
</code></pre>
685685
<pre><code class="python language-python hljs"><span class="hljs-keyword">from</span> dataclasses <span class="hljs-keyword">import</span> make_dataclass
686686
Creature = make_dataclass(<span class="hljs-string">'Creature'</span>, [<span class="hljs-string">'location'</span>, <span class="hljs-string">'direction'</span>])

0 commit comments

Comments
 (0)