Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b1d4e05

Browse files
committed
Minor fixes
1 parent 5fc4971 commit b1d4e05

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -474,7 +474,7 @@ lambda <argument_1>, <argument_2>: <return_value>
474474
<list> = [i+1 for i in range(10)] # [1, 2, ..., 10]
475475
<set> = {i for i in range(10) if i > 5} # {6, 7, ..., 9}
476476
<dict> = {i: i*2 for i in range(10)} # {0: 0, 1: 2, ..., 9: 18}
477-
<iter> = (x+5 for x in range(10)) # (5, 6, ..., 14)
477+
<iter> = (i+5 for i in range(10)) # (5, 6, ..., 14)
478478
```
479479

480480
```python
@@ -519,7 +519,7 @@ Point = namedtuple('Point', 'x y')
519519

520520
from enum import Enum
521521
Direction = Enum('Direction', 'n e s w')
522-
Cutlery = Enum('Cutlery', {'knife': 1, 'fork': 2, 'spoon': 3})
522+
Cutlery = Enum('Cutlery', {'knife': 1, 'fork': 2, 'spoon': 3})
523523

524524
# Warning: Objects will share the objects that are initialized in the dictionary!
525525
Creature = type('Creature', (), {'position': Point(0, 0), 'direction': Direction.n})
@@ -634,9 +634,9 @@ class <enum_name>(Enum):
634634
<member_name_3> = auto() # Can be used for automatic indexing.
635635
...
636636

637-
@classmethod
638-
def get_names(cls):
639-
return [a.name for a in cls.__members__.values()]
637+
@classmethod
638+
def get_member_names(cls):
639+
return [a.name for a in cls.__members__.values()]
640640
```
641641

642642
```python
@@ -1460,7 +1460,7 @@ NumPy
14601460
```
14611461

14621462
```python
1463-
value = <array>.min([axis]) # 0: columns, 1: rows
1463+
value = <array>.min([axis])
14641464
index = <array>.argmin([axis])
14651465
```
14661466

0 commit comments

Comments
 (0)