def create(cls, obj, body, evaldict, defaults=None,
               doc=None, module=None, addsource=True, **attrs):
        """
        Create a function from the strings name, signature and body.
        evaldict is the evaluation dictionary. If addsource is true an attribute
        __source__ is added to the result. The attributes attrs are added,
        if any.
        """
        if isinstance(obj, str): # "name(signature)"
            name, rest = obj.strip().split('(', 1)
            signature = rest[:-1] #strip a right parens
            func = None
        else: # a function
            name = None
            signature = None
            func = obj
        self = cls(func, name, signature, defaults, doc, module)
        ibody = '\n'.join('    ' + line for line in body.splitlines())
        return self.make('def %(name)s(%(signature)s):\n' + ibody,
                        evaldict, addsource, **attrs)
def create ( cls , obj , body , evaldict , defaults = None , doc = None , module = None , addsource = True , ** attrs ) : if isinstance ( obj , str ) : name , rest = obj . strip ( ) . split ( '(' , 1 ) signature = rest [ : - 1 ] func = None else : name = None signature = None func = obj self = cls ( func , name , signature , defaults , doc , module ) ibody = '\n' . join ( '    ' + line for line in body . splitlines ( ) ) return self . make ( 'def %(name)s(%(signature)s):\n' + ibody , evaldict , addsource , ** attrs )
Create a function from the strings name, signature and body.
        evaldict is the evaluation dictionary. If addsource is true an attribute
        __source__ is added to the result. The attributes attrs are added,
        if any.