add format function
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 17:35:09 +0000 (17:35 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Tue, 20 Mar 2018 17:35:09 +0000 (17:35 +0000)
src/interface_decl.py

index 04fd8bfa37ed4128547c008a8d57298f06e57a20..e34d102290fc32a4fdc58631a08a75c09d026a76 100644 (file)
@@ -64,6 +64,8 @@ class Interface(object):
     def __str__(self):
         return '\n'.join(map(str, self.pins))
 
+    def format(self, i):
+        return str(self).format(i)
 
 # basic test
 if __name__ == '__main__':