Skip to content

Commit 51b218c

Browse files
author
Sakis Kasampalis
committed
python3 compatibility change
1 parent 5730bd5 commit 51b218c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adapter.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ class Adapter(object):
5454
>>> objects.append(Adapter(car, dict(make_noise=car_noise)))
5555
5656
>>> for obj in objects:
57-
... print("A", obj.name, "goes", obj.make_noise())
58-
('A', 'Dog', 'goes', 'woof!')
59-
('A', 'Cat', 'goes', 'meow!')
60-
('A', 'Human', 'goes', "'hello'")
61-
('A', 'Car', 'goes', 'vroom!!!')
57+
... print('A {} goes {}'.format(obj.name, obj.make_noise()))
58+
A Dog goes woof!
59+
A Cat goes meow!
60+
A Human goes 'hello'
61+
A Car goes vroom!!!
6262
"""
6363
def __init__(self, obj, adapted_methods):
6464
"""We set the adapted methods in the object's dict"""

0 commit comments

Comments
 (0)