We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 3afc5fc + 51b218c commit da97203Copy full SHA for da97203
adapter.py
@@ -54,11 +54,11 @@ class Adapter(object):
54
>>> objects.append(Adapter(car, dict(make_noise=car_noise)))
55
56
>>> 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!!!')
+ ... print('A {} goes {}'.format(obj.name, obj.make_noise()))
+ A Dog goes woof!
+ A Cat goes meow!
+ A Human goes 'hello'
+ A Car goes vroom!!!
62
"""
63
def __init__(self, obj, adapted_methods):
64
"""We set the adapted methods in the object's dict"""
0 commit comments