Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Public Attributes

# func_closure Class Reference

List of all members.

## Public Member Functions
def | __init__
def | generic_func
## Public Attributes
| name

## 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
    **kw.

## Constructor & Destructor Documentation

def __init__ | ( |  | self,
|  |  | name
| ) |  |

## Member Function Documentation

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.

## Member Data Documentation

name

All Classes Namespaces Functions Variables Enumerations Enumerator Properties