Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ListCont():
- def __repr__(self):
- return f'Instance of {self.__class__.__name__} , address {id(self)}, {self.__attrname()}'
- def __attrname(self):
- result = ''
- for attr in dir(self):
- if attr[:2] == '__' and attr[-2:] == '__':
- result += f'\tname {attr} = <>\n'
- else:
- result += f'{attr} = {getattr(self,attr)}\n'
- return result
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement