We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebbacb4 commit a0d3711Copy full SHA for a0d3711
adapter.py
@@ -46,8 +46,10 @@ class Adapter(object):
46
>>> objects = []
47
>>> dog = Dog()
48
>>> print(dog.__dict__)
49
+ {'name': 'Dog'}
50
>>> objects.append(Adapter(dog, make_noise=dog.bark))
51
>>> print(objects[0].original_dict())
52
53
>>> cat = Cat()
54
>>> objects.append(Adapter(cat, make_noise=cat.meow))
55
>>> human = Human()
chaining_method.py
@@ -1,6 +1,8 @@
1
#!/usr/bin/env python
2
# -*- coding: utf-8 -*-
3
4
+from __future__ import print_function
5
+
6
class Person(object):
7
8
def __init__(self, name, action):
0 commit comments