Panda3D
|
Public Member Functions | |
def | __init__ (self, name) |
def | generic_func (self, *args, **kw) |
Public Attributes | |
name | |
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 ``**kw``.
def __init__ | ( | self, | |
name | |||
) |
def generic_func | ( | self, | |
* | args, | ||
** | 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.
name |