Re: [Tutor] test

2010-12-27 Thread Chrystal
Hi guys I'll be happy if someone can help evaluate the result of this statement: for n in range (3, 20): > for x in range (2, n): > print (n) > I tried but couldn't figure out why the loop returned such a result Merry Christmas Thanks ___ Tutor maill

Re: [Tutor] test

2010-12-27 Thread Paolino Gianrossi
Il 27/12/2010 14.44, Chrystal ha scritto: > Hi guys > > I'll be happy if someone can help evaluate the result of this statement: > > for n in range (3, 20): > for x in range (2, n): > print (n) > > > I tried but couldn't figure out why the loop returned such a result > > Merry Chri

Re: [Tutor] test

2010-12-27 Thread Steven D'Aprano
Chrystal wrote: Hi guys I'll be happy if someone can help evaluate the result of this statement: for n in range (3, 20): for x in range (2, n): print (n) I tried but couldn't figure out why the loop returned such a result It would help if you told us what result you get, what result you

[Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread Frank Chang
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"

Re: [Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread Serdar Tumgoren
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

Re: [Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread bob gailer
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.

Re: [Tutor] Python 2.7.1 interpreter complains about NameError: global name 'levenshtein_automata' is not defined

2010-12-27 Thread Alan Gauld
"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