Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > class objects, method objects, function objects

Reply
Thread Tools

class objects, method objects, function objects

 
 
7stud
Guest
Posts: n/a
 
      03-20-2007
Thanks Duncan and Dennis.

 
Reply With Quote
 
 
 
 
Dennis Lee Bieber
Guest
Posts: n/a
 
      03-20-2007
On Tue, 20 Mar 2007 16:03:53 +0100, "Fredrik Lundh"
<> declaimed the following in comp.lang.python:

> Dennis Lee Bieber wrote:
>
> > "it(the" -- argument list, not the object -- ") is unpacked again

>
> no, "it" refers to the bound method object, as 7stud would have realized if
> he'd read the entire paragraph. here's the relevant portion:
>
> /.../ a method object is created by packing (pointers to) the instance object
> and the function object just found together in an abstract object: this is the
> method object. When the method object is called with an argument list, it
> is unpacked again /.../
>

Ah, one level more of indirection (in understanding, not code
pointers)... At least, it now reads like...

instance.method(argu, ments)

-> (instance, class_function)(argu, ments)

-> class_function(instance, argu, ments)
--
Wulfraed Dennis Lee Bieber KD6MOG

HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: web-)
HTTP://www.bestiaria.com/
 
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
injecting an instance method into another class' class method Chuck Remes Ruby 3 08-12-2010 07:15 PM
why a class can't access protected method from another class in thesame package,the method is interited from the ohtner class from differntpackage? junzhang1983@gmail.com Java 3 01-28-2008 02:09 AM
how to call method of the class which contains a pointer to other class method? Pawel_Iks C++ 3 07-31-2007 06:30 AM
Confused by Method(function) of a module and method of a class/instance Sullivan WxPyQtKinter Python 5 03-07-2006 05:23 PM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57