@@ -474,7 +474,7 @@ lambda <argument_1>, <argument_2>: <return_value>
474
474
< list > = [i+ 1 for i in range (10 )] # [1, 2, ..., 10]
475
475
< set > = {i for i in range (10 ) if i > 5 } # {6, 7, ..., 9}
476
476
< 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)
478
478
```
479
479
480
480
``` python
@@ -519,7 +519,7 @@ Point = namedtuple('Point', 'x y')
519
519
520
520
from enum import Enum
521
521
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 })
523
523
524
524
# Warning: Objects will share the objects that are initialized in the dictionary!
525
525
Creature = type (' Creature' , (), {' position' : Point(0 , 0 ), ' direction' : Direction.n})
@@ -634,9 +634,9 @@ class <enum_name>(Enum):
634
634
< member_name_3> = auto() # Can be used for automatic indexing.
635
635
...
636
636
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()]
640
640
```
641
641
642
642
``` python
@@ -1460,7 +1460,7 @@ NumPy
1460
1460
```
1461
1461
1462
1462
``` python
1463
- value = < array> .min([axis]) # 0: columns, 1: rows
1463
+ value = < array> .min([axis])
1464
1464
index = < array> .argmin([axis])
1465
1465
```
1466
1466
0 commit comments