From 0b41bae086020d3467d9da16a90cb7d912956a77 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Tue, 20 Mar 2018 21:10:28 +0000 Subject: [PATCH] use ifacefmt function name consistently --- src/interface_decl.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/interface_decl.py b/src/interface_decl.py index 1ceb841..582d462 100644 --- a/src/interface_decl.py +++ b/src/interface_decl.py @@ -17,7 +17,7 @@ class Pin(object): self.io = io self.action = action - def __str__(self): + def ifacefmt(self): res = ' ' status = [] if self.ready: @@ -63,11 +63,8 @@ class Interface(object): else: self.pins.append(Pin(**p)) - def __str__(self): - return '\n'+'\n'.join(map(str, self.pins)) - def ifacefmt(self, i): - return str(self).format(i) + return '\n'+'\n'.join(map(lambda x:x.ifacefmt(), self.pins)).format(i) # basic test if __name__ == '__main__': -- 2.30.2