By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,772 Members | 935 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,772 IT Pros & Developers. It's quick & easy.

let me simplify my question about scope of vars

P: n/a
class CLASS:
def METHOD1:
def METHOD2:
return var
METHOD2() #line8
return var
METHOD1() #line10
Q1: does class CLASS inherit var=0 from line1?
Q2: does def METHOD1 inherit var=0 from line1?
Q3: does def METHOD2 inherit var=0 from line1?
Q3: does line8 return '2'?
Q4: does line10 return '2\n2'?
Dec 23 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.