Tuesday, December 3, 2019

'__repr__' example

class TestClass:
    def __init__(self, a, b):
        self.a = a
        self.b = b

    def __repr__(self):
        return '{self.__class__.__name__}({self.a}, {self.b})'.format(self=self)

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.

ALCATEL 6900

write memory copy running certified reload from working no rollback-timeout