KraftDiner wrote:
> I have a question..
> 
> myGlobalDictionary = dictionary()
> 
> 
> class someClass:
>    def __init__(self):
>       self.x = 0;
>    def getValue(self, v)
>       myGlobalDictionary.getVal(v)
> 
> 
> myGlobalDictionary doesn't seem to be visible to my someClass methods.
> Why?  What should I do?
> 
Is it an oversight that you forgot the ':' on the getValue definition?
You also forgot to do the return. I say the code should look like:

def getValue(self,v) :
        return myGlobalDictionary[v]

I am also confused as to what getVal() does.

Chaz
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to