Thanks a lot for the responses ppl. Python's treatment of global
variables was an eye-opener. I have coded in Java & C/C++ in the past
and there the behaviour is diametrically opposite.
Cheers
--
http://mail.python.org/mailman/listinfo/python-list
Hi. Sorry to sound like a noob but that's what I am when it comes to
Python. I just wrote the below module and it behaves funny.
My python module:
_exitcode = 0
def setExitCode():
_exitcode = 1
if __name__ == '__main__':
print _exitcode
setExitCode()
print _exitcode
Actual O/P: