Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: code explanation

Reply
Thread Tools

Re: code explanation

 
 
Terry Reedy
Guest
Posts: n/a
 
      01-15-2013
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Explanation on some code Michael Albers Ruby 5 12-01-2008 06:18 PM
looking for explanation of bind2nd() source code responsible C++ 4 08-05-2008 03:51 PM
Code explanation requeted Neville Franks Ruby 4 02-06-2007 06:58 PM
JCP code- can anybody gve explanation uthra Java 1 11-10-2006 09:04 PM
Explanation of code needed Phil Thompson Javascript 4 03-22-2005 05:55 PM



Advertisments