Public Member Functions | Public Attributes | List of all members
func_closure Class Reference

Public Member Functions

def __init__ (self, name)
def generic_func (self, *args, **kw)

Public Attributes


Detailed Description

This class is used to create a closure on the function name,
and also allows the *args, **kw syntax.  In Python, the lambda
syntax, used with default parameters, is used more often to create
a closure (that is, a binding of one or more variables into a
callable object), but that syntax doesn't work with **kw.
Fortunately, a class method is also a form of a closure, because
it binds self; and this doesn't have any syntax problems with

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,

Member Function Documentation

◆ generic_func()

def generic_func (   self,
**  kw 
This method is bound to all the functions that might be
called from the pdef file.  It's a special function; when it is
called, it does nothing but store its name and arguments in the
caller's local scope, where they can be pulled out later. 

Member Data Documentation

◆ name