We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ee35c30 commit 69a15e4Copy full SHA for 69a15e4
1 file changed
working-with-the-python-operator-module/attrgetter_selecting.py
@@ -1,6 +1,6 @@
1
+import operator
2
from dataclasses import dataclass
3
-
4
@dataclass
5
class Musician:
6
id: int
@@ -24,8 +24,6 @@ class Musician:
24
for musician in musicians_list:
25
group_members.append(Musician(*musician))
26
27
-import operator
28
29
# Returning a single attribute.
30
get_fname = operator.attrgetter("fname")
31
0 commit comments