code explanation

Rodrick Brown rodrick.brown at gmail.com
Tue Jan 15 05:00:16 CET 2013


Can someone explain what's going on here.

def _build_magic_dispatcher(method):
    def inner(self, *args, **kwargs):
        return self.__dict__[method](*args, **kwargs)
    inner.__name__ = method
    return inner

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130114/4ee07d8f/attachment.html>


More information about the Python-list mailing list