Skip to content

Commit 825fe1a

Browse files
committed
Fix linter check
1 parent c94fb3a commit 825fe1a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

python-copy/person.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ def __replace__(self, **changes):
5555
person = Person("John Doe", 42)
5656
person_copy = copy.replace(person, age=24, name="Alice Smith")
5757

58-
vars_slots = lambda obj: {
59-
name: getattr(obj, name) for name in obj.__slots__
60-
}
58+
def vars_slots(obj):
59+
return {name: getattr(obj, name) for name in obj.__slots__}
6160

6261
print(vars_slots(person))
6362
print(vars_slots(person_copy))

0 commit comments

Comments
 (0)