| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -39,10 +39,14 @@ def __init__(self): | |||
| 39 | 39 | h1.successor(h2) | |
| 40 | 40 | h2.successor(h3) | |
| 41 | 41 | ||
| 42 | - requests = [2, 5, 14, 22, 18, 3, 35, 27, 20] | ||
| 42 | + self.handlers = (h1,h2,h3) | ||
| 43 | + | ||
| 44 | + def delegate(self, requests): | ||
| 43 | 45 | for request in requests: | |
| 44 | - h1.handle(request) | ||
| 46 | + self.handlers[0].handle(request) | ||
| 45 | 47 | ||
| 46 | 48 | ||
| 47 | 49 | if __name__ == "__main__": | |
| 48 | 50 | client = Client() | |
| 51 | + requests = [2, 5, 14, 22, 18, 3, 35, 27, 20] | ||
| 52 | + client.delegate(requests) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments