The parentheses allow us to disambiguate the function object, func
, from the calling of the function, func()
.
Function objects are first-class objects in Python. You can, for instance, pass them as arguments to functions, just like any other object. This is often used to set a callback function -- a common practice in GUI programming or concurrent programming.