Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #36834 > unrolled thread

Re: code explanation

Started byTerry Reedy <tjreedy@udel.edu>
First post2013-01-14 23:48 -0500
Last post2013-01-14 23:48 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: code explanation Terry Reedy <tjreedy@udel.edu> - 2013-01-14 23:48 -0500

#36834 — Re: code explanation

FromTerry Reedy <tjreedy@udel.edu>
Date2013-01-14 23:48 -0500
SubjectRe: code explanation
Message-ID<mailman.527.1358225303.2939.python-list@python.org>
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

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web