Custom string conversion in Python

class Some(object):
    def __str__(self):
        return "Some class"

Usage example

1.

sm = Some()
print(sm)

print automatically converts argument to string.

2.

sm = Some()
s = str(sm)