Add description

This commit is contained in:
sfigato 2020-08-29 20:07:56 +02:00
parent 6fea75022f
commit d9a6db63d7
Signed by: blallo
GPG Key ID: 0CBE577C9B72DC3F

View File

@ -22,6 +22,10 @@ alog.setLevel(logging.DEBUG)
def get_class(obj): def get_class(obj):
"""
Return the input if input is a class, else tryes to get the class from the
`__class__` method.
"""
if type(obj) is type: if type(obj) is type:
return obj return obj
return obj.__class__ return obj.__class__