ABSTRACT

In Python and similar languages functions are first-class objects. There is no restriction on the number of arguments with default values for a function, but these must always conclude the sequence of arguments. Default values have been defined a number of times in prior functions. The splat operator is useful for calling functions for which we already have arguments defined and stored in a collection. Since functions are objects in Python, not only can they may be selected programmatically, but also may be generated programmatically. Functions that receive another function as an argument or produce one as a result are termed higher-order functions. A Python function is considered first-class because it enjoys all the privileges of any other object in memory: it may be assigned to variables; programmatically created, stored, and destroyed; and it may be offered as the return value of other functions.