"David" wrote
def main():
x = 3
f(x)
def f(whatever):
print whatever
main()
I am not quite sure what is going on here. Could you please correct
my line of thought?
As others have said you are pretty much correct apart from some
terminology.
However one of the insanely great
David wrote:
Dear List,
the following comes from Harrington's "Hands-on Python" (section
1.11.8): http://www.cs.luc.edu/~anh/python/hands-on/
'''Avoiding any error by passing a parameter'''
def main():
x = 3
f(x)
def f(whatever):
print whatever
main()
I am not quite sure
Le Sat, 31 Jan 2009 00:30:18 +0800,
David a écrit :
> Dear List,
>
> the following comes from Harrington's "Hands-on Python" (section
> 1.11.8): http://www.cs.luc.edu/~anh/python/hands-on/
>
>
>
>
> '''Avoiding any error by passing a parameter'''
>
> def main():
> x = 3
> f(x)
>
Dear List,
the following comes from Harrington's "Hands-on Python" (section
1.11.8): http://www.cs.luc.edu/~anh/python/hands-on/
'''Avoiding any error by passing a parameter'''
def main():
x = 3
f(x)
def f(whatever):
print whatever
main()
I am not quite sure what is going