Re: class objects, method objects, function objects

2007-03-20 Thread 7stud
Thanks Duncan and Dennis. -- http://mail.python.org/mailman/listinfo/python-list

Re: class objects, method objects, function objects

2007-03-20 Thread Fredrik Lundh
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

Re: class objects, method objects, function objects

2007-03-19 Thread Duncan Booth
"7stud" <[EMAIL PROTECTED]> wrote: > When the method object is called with an > argument list, > > x.g("GvR") ==> I think I'm both "referencing an instance attribute" > and calling the method object with an argument list > > it(the method object) is unpacked again, a new argument list is > const

Re: class objects, method objects, function objects

2007-03-19 Thread 7stud
Hi, Thanks for the responses. I understand that python automatically sends 'self' to a member function, i.e. self gets prepended to the argument list. I guess I am having trouble with this statement: When the method object is called with an argument list, it is unpacked again, a new argumen

Re: class objects, method objects, function objects

2007-03-19 Thread Fredrik Lundh
"7stud" wrote: > But the last part of the passage makes no sense to me: > -- > When the method object is called with an argument list, it is unpacked > again, a new argument list is constructed from the instance object and > the original argument list, and the function object is called with > t

Re: class objects, method objects, function objects

2007-03-18 Thread Alex Martelli
7stud <[EMAIL PROTECTED]> wrote: ... > But the last part of the passage makes no sense to me: > -- > When the method object is called with an argument list, it is unpacked > again, a new argument list is constructed from the instance object and > the original argument list, and the function

Re: class objects, method objects, function objects

2007-03-18 Thread Gabriel Genellina
En Mon, 19 Mar 2007 01:38:37 -0300, 7stud <[EMAIL PROTECTED]> escribió: > But the last part of the passage makes no sense to me: > -- > When the method object is called with an argument list, it is unpacked > again, a new argument list is constructed from the instance object and > the origin

Re: class objects, method objects, function objects

2007-03-18 Thread 7stud
Darn. I made some changes to the class and I didn't change the function object. It should be: | V function object - | def sayHi(self): | | print "Hello " + self.name| |_| --

Re: class objects, method objects, function objects

2007-03-18 Thread 7stud
Oops, here is that last sentence in context(section 9.3.4): What exactly happens when a method is called? You may have noticed that x.f() was called without an argument above, even though the function definition for f specified an argument. What happened to the argument? Surely Python

class objects, method objects, function objects

2007-03-18 Thread 7stud
Hi, I'm trying to figure out what this passage from GvR's tutorial means: --- Class definitions, like function definitions (def statements) must be executed before they have any effect When a class definition is entered, a new namespace is created... When a class definition is left norma