Skip to content

Commit 69a15e4

Browse files
authored
Update attrgetter_selecting.py
1 parent ee35c30 commit 69a15e4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

working-with-the-python-operator-module/attrgetter_selecting.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import operator
12
from dataclasses import dataclass
23

3-
44
@dataclass
55
class Musician:
66
id: int
@@ -24,8 +24,6 @@ class Musician:
2424
for musician in musicians_list:
2525
group_members.append(Musician(*musician))
2626

27-
import operator
28-
2927
# Returning a single attribute.
3028
get_fname = operator.attrgetter("fname")
3129

0 commit comments

Comments
 (0)