<filename>Python3/Python3_Lesson09/src/callmagic.py
"""
Demonstrate how to make instances callable.
"""

class funclike:
    def __call__(self, *args, **kwargs):
        print("Args are:", args)
        print("Kwargs are:", kwargs)
        
f = funclike()
f(1, 2, 3, this="one", that="the other")


<filename>Python3/Python3_Lesson09/src/callmagic.py
"""
Demonstrate how to make instances callable.
"""

class funclike:
    def __call__(self, *args, **kwargs):
        print("Args are:", args)
        print("Kwargs are:", kwargs)
        
f = funclike()
f(1, 2, 3, this="one", that="the other")


Demonstrate how to make instances callable.