lib.wiring: add __repr__ to Interface.
This commit is contained in:
parent
28139f5f4b
commit
ab6503e352
2 changed files with 24 additions and 2 deletions
|
|
@ -607,6 +607,12 @@ class Interface:
|
|||
**signature.members.create(path=path)
|
||||
})
|
||||
|
||||
def __repr__(self):
|
||||
attrs = ''.join(f", {name}={value!r}"
|
||||
for name, value in self.__dict__.items()
|
||||
if name != "signature")
|
||||
return f'<Interface: {self.signature}{attrs}>'
|
||||
|
||||
|
||||
# To reduce API surface area `FlippedInterface` is made final. This restriction could be lifted
|
||||
# if there is a compelling use case.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue