bitcanon / visonicalarm

A simple library for the Visonic Alarm API written in Python 3.
MIT License
12 stars 2 forks source link

Add string methods for classes for easier printing #2

Closed bitcanon closed 3 years ago

bitcanon commented 3 years ago

Add the str() and repr() methods to the Device classes to make it easier to print and show these objects.

Example:

def __str__(self):
    object_type = str(type(self))
    return object_type + ": This is a Contact Device str."

def __repr__(self):
    object_type = str(type(self))
    return object_type + ": This is a Contact Device repr."
bitcanon commented 3 years ago

This has been resolved in commit fc254e2083608ebc348e8749e6b9df00fbba933b.