Dear All,<br><br>I have the following two methods in a module. I cannot put them in a class, as the code is a complicated one.<br><br>def a(num):<br> found = num in Numlist<br> print found<br><br>def b():<br> scop = {}<br> scop['Numlist'] = [1,2,3]<br> scop['a'] = a<br> exec("a(3)",scop)<br><br>How can I access the "Numlist" inside the method a, without using classes or defining Numlist as GLOBAL? I prefer using scops in this problem. Is there a way?<br><br>Thank you very much,<br>Navid<br><p>
<hr size=1>Looking for last minute shopping deals? <a href="http://us.rd.yahoo.com/evt=51734/*http://tools.search.yahoo.com/newsearch/category.php?category=shopping">
Find them fast with Yahoo! Search.</a>