Thanks Duncan and Dennis.
--
http://mail.python.org/mailman/listinfo/python-list
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
"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
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
"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
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
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
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|
|_|
--
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
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
10 matches
Mail list logo