[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why does this work?
- From: Chris Babcock <cbabcock@...>
- Date: Thu, 3 Feb 2011 21:04:28 -0700
On Thu, Feb 3, 2011 at 8:30 PM, Steve Litt <slitt@troubleshooters.com> wrote:
> I understand everything except the magical working of argument str. How does
> the oldprint(str) between the lines of equal know that the str arg in the
> function declaration refers to the argument of the original print()? Looks
> like magic to me, and I'm going to have to explain it.
The variable is defined implicitly when the argument is passed to the
function. No "str=self.str" required. ;)
Chris
--
51st century guy