From f74cae77c506219805283323588249107b7086c2 Mon Sep 17 00:00:00 2001 From: GiantsLoveDeathMetal Date: Tue, 29 May 2018 00:27:05 +0100 Subject: [PATCH] Fix adapter usage example Passing a dict instead of kwarg. Initialising Dog class. --- structural/adapter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/structural/adapter.py b/structural/adapter.py index 21a3a612..46660b65 100644 --- a/structural/adapter.py +++ b/structural/adapter.py @@ -72,8 +72,8 @@ class Adapter(object): """ Adapts an object by replacing methods. Usage: - dog = Dog - dog = Adapter(dog, dict(make_noise=dog.bark)) + dog = Dog() + dog = Adapter(dog, make_noise=dog.bark) >>> objects = [] >>> dog = Dog()