瀏覽代碼

python3 compatibility change

Sakis Kasampalis 12 年之前
父節點
當前提交
51b218c939
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      adapter.py

+ 5 - 5
adapter.py

@@ -54,11 +54,11 @@ class Adapter(object):
     >>> objects.append(Adapter(car, dict(make_noise=car_noise)))
     >>> objects.append(Adapter(car, dict(make_noise=car_noise)))
 
 
     >>> for obj in objects:
     >>> for obj in objects:
-    ...     print("A", obj.name, "goes", obj.make_noise())
-    ('A', 'Dog', 'goes', 'woof!')
-    ('A', 'Cat', 'goes', 'meow!')
-    ('A', 'Human', 'goes', "'hello'")
-    ('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!!!
     """
     """
     def __init__(self, obj, adapted_methods):
     def __init__(self, obj, adapted_methods):
         """We set the adapted methods in the object's dict"""
         """We set the adapted methods in the object's dict"""