"Frank Chang" wrote
Good morning, I am using Python 2.7.1 on Windows XP Service Pack 3.
Here
is the program where the Python interpreter complains about
NameError:
global name 'levenshtein_automata' is not defined.
The others have answered the specific question, however I think you
have a
See my comment following line 145:
On 12/27/2010 8:25 PM, Frank Chang wrote:
Good morning, I am using Python 2.7.1 on Windows XP Service Pack 3.
Here is the program where the Python interpreter complains about
NameError: global name 'levenshtein_automata' is not defined.
The python 2,7.
It appears that you've defined "levenshtein_automata" as a method on your
DFA class, but you did not reference the class instance in your call by
prefixing "self". Instead, you're trying to call a globally defined function
named "levenshtein_automata" -- which because it is not defined, is throwing
Good morning, I am using Python 2.7.1 on Windows XP Service Pack 3. Here
is the program where the Python interpreter complains about NameError:
global name 'levenshtein_automata' is not defined.
The python 2,7.1 error message is:
Traceback (most recent call last):
File "automata_test.py"