projects
/
pinmux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d8dcccf
)
use ifacefmt function name consistently
author
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 20 Mar 2018 21:10:28 +0000
(21:10 +0000)
committer
Luke Kenneth Casson Leighton
<lkcl@lkcl.net>
Tue, 20 Mar 2018 21:10:28 +0000
(21:10 +0000)
src/interface_decl.py
patch
|
blob
|
history
diff --git
a/src/interface_decl.py
b/src/interface_decl.py
index 1ceb841fb7baa5fb89f0e9949bddb4965a62bee8..582d462e28aeb45e28405c42bc3de5e0701ec5cf 100644
(file)
--- 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__':