Re: [Tutor] Class and Scope Question

2005-05-06 Thread Tim Johnson
* Karl Pflästerer <[EMAIL PROTECTED]> [050506 10:40]: >Karl > -- > Please do *not* send copies of replies to me. > I read the list My Thanks to both Karl and Rich for help me to understand this problem. I also appreciate the documentation reference. cheers tim -- Tim Johnson <[EMAIL

Re: [Tutor] Class and Scope Question

2005-05-06 Thread Karl Pflästerer
On 6 Mai 2005, [EMAIL PROTECTED] wrote: > > The following test script is kind of got me baffled: >#!/usr/local/bin/python > class Eval: > def __getitem__(self,key): > return eval(key) >##def test(): >## i = 100 >## b = ["My", "name", "is", "Tim"] >## test = "this is number %(str(i)

Re: [Tutor] Class and Scope Question

2005-05-06 Thread Rich Krauter
Tim Johnson wrote: > The following test script is kind of got me baffled: > #!/usr/local/bin/python > class Eval: > def __getitem__(self,key): > return eval(key) > ##def test(): > ## i = 100 > ## b = ["My", "name", "is", "Tim"] > ## test = "this is number %(str(i))s for a test %(' '.

[Tutor] Class and Scope Question

2005-05-05 Thread Tim Johnson
The following test script is kind of got me baffled: #!/usr/local/bin/python class Eval: def __getitem__(self,key): return eval(key) ##def test(): ## i = 100 ## b = ["My", "name", "is", "Tim"] ## test = "this is number %(str(i))s for a test %(' '.join(b))s" ## s = test % Eval() ##