call allows you to treat an instance of a class as a function.
class Print: def __call__(self, a): print(a) b = Print() b('aiueo')
output
aiueo
Recommended Posts