Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.albasani.net!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '*args,': 0.07; 'subject:code': 0.07; '**kwargs)': 0.09; '**kwargs):': 0.09; 'def': 0.10; 'here.\xa0': 0.16; '8bit%:3': 0.17; 'to:name:python- list@python.org': 0.20; 'thanks.': 0.21; 'message- id:@mail.gmail.com': 0.27; 'skip:_ 30': 0.32; 'to:addr:python- list': 0.33; 'received:google.com': 0.34; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'explain': 0.36; 'method': 0.36; 'received:209': 0.37; 'to:addr:python.org': 0.39; 'header:Received:5': 0.40 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=w0nrlGNdZfBmBWzxRqLJaQKs2p2ucKqcTxjZlBr4vSg=; b=LV2CYjn3GbwE85o9U6mLTigV3+b5tn7rZLxzNTl4s8WiNRrSaawsPQLGoq6iDr+L6t /qHMf9dOw8dB2O4ZYlhUnsKMB2jIdISYkFdbM0AMov5vLTZIuah6sgPazntZ8ReAmmyw XTt+5IuWgY5fvlwkwOOZsKVWyeq09YMI5lAar4IsIualeV7s8CtFsQjBGwDPMuG9z0FE XCJvBt2ZIjqD5gWPXamuyAn0RDXaZMwnIT6r7qxDWnMzulyoCCTwisI0i9jm5eJHy/rN vUuNZBVh2wNo1Vr02dLWCbd7eIvaYvcwwLlgoDUZ+FtUHUm6PIfZf8V+gDwY/xdXzNk4 eHqQ== MIME-Version: 1.0 From: Rodrick Brown Date: Mon, 14 Jan 2013 23:00:16 -0500 Subject: code explanation To: "python-list@python.org" Content-Type: multipart/alternative; boundary=e89a8ff1c37e8779ae04d34bcec6 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1358222451 news.xs4all.nl 6922 [2001:888:2000:d::a6]:34529 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36831 --e89a8ff1c37e8779ae04d34bcec6 Content-Type: text/plain; charset=ISO-8859-1 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. --e89a8ff1c37e8779ae04d34bcec6 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Can someone explain what's going on here.=A0

<= /div>
def _build_magic_dispatcher(method):
=A0 =A0 def i= nner(self, *args, **kwargs):
=A0 =A0 =A0 =A0 return self.__dict__= [method](*args, **kwargs)
=A0 =A0 inner.__name__ =3D method
=A0 =A0 return inner
=

Thanks.
--e89a8ff1c37e8779ae04d34bcec6--