A example in learning Python by Mark Lutz and David Ascher
about function scope
example like this:
>>def outer(x):
def inner(i):
print i,
if i: inner(i-1)
inner(x)
>>outer(3)
Here supposely, it should report error, because the function inner
cannot see
Thanks all for replying.
I finally know what's going on.
--
http://mail.python.org/mailman/listinfo/python-list
I know this is dummy, just never saw an example of this.
I want to use the special argument matching.
A code like this:
def adder(**varargs):
sum=varargs[varargs.keys()[0]]
for next in varargs.keys()[1:]:
sum=sum+varargs[next]
return sum
print adder( "first","
thanks, got it.
I want to test the **name option for argument matching.
--
http://mail.python.org/mailman/listinfo/python-list
An example in the book I didn't understood well
two modules files recursively import/from each other
in recur1.py,we have:
x=1
import recur2
y=1
in recur2.py, we have
from recur1 import x
from recur1 import y
If we run interactively at python command line,
>>> import recur1
it has errors li
anything related to csv, I usually use VB within excel to manipulate
the data, nonetheless, i finally got the courage to take a dive into
python. i have viewed a lot of googled csv tutorials, but none of
them address everything i need. Nonetheless, I was wondering if
someone can help me manipulat