[Tutor] function declaration problems perhaps?

nibudh nibudh at gmail.com
Wed Jul 25 09:27:11 CEST 2007


Hi list,

I've just been writing a small script to parse some xml files and output tab
separated values into a separate file.

I was surprised to see that my function "processXML(fpart)" was failing with
an error along the lines of "processXML not defined"

 I looked over my code (all 41 lines!) and couldn't find anything, then on a
hunch i moved the def statement _above_ the rest of my code and hey presto
it worked.

I vaguely understand why this is happening, but can someone explain it to
me.

If this makes no sense then tell me that too :-)

cheers,

nibudh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070725/5fd770cd/attachment.htm 


More information about the Tutor mailing list