variable is local and global

Skip Montanaro skip at pobox.com
Mon Jul 26 04:49:42 CEST 2004


    Kyle> bash-2.05b$ ./version.py
    Kyle>    File "./version.py", line 11
    Kyle>      def make_acceptable(version):
    Kyle> SyntaxError: name 'version' is local and global

Change either the name of the global variable or the name of the parameter.
They can't both be named "version".

Skip



More information about the Python-list mailing list