'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.'

@classmethod
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)
