|
|
|
|
|
by ubernostrum
3577 days ago
|
|
almost everything is a method Not "almost". Just "everything is a method", in terms of function calls. Even user-defined standalone functions. Consider: def my_func(arg):
return arg + 5
The following are equivalent, and show how things work: my_func(3)
and my_func.__call__(3)
and types.FunctionType.__call__(my_func, 3)
|
|