Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #36834
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Subject | Re: code explanation |
| Date | 2013-01-14 23:48 -0500 |
| References | <CABRP1o-irYAo5hyM-07ASMADDDr0KQTxkSthbS_a1XBg0KV_3g@mail.gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.527.1358225303.2939.python-list@python.org> (permalink) |
On 1/14/2013 11:00 PM, Rodrick Brown wrote: > 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 Nothing, until you run that with some particular version of Python. If you do run it, the result should be as documented for that particular version. If you write additional code to call the function, the result will depend on the Python version and argument. Now, what did you actually want to know ;-? You should likely find the answer in the reference manual, especially the section on def statements. -- Terry Jan Reedy
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: code explanation Terry Reedy <tjreedy@udel.edu> - 2013-01-14 23:48 -0500
csiph-web