[Tutor] Fwd: thesaurus

Rich Lovely roadierich at googlemail.com
Thu Jul 9 04:29:55 CEST 2009


2009/7/9 Pete Froslie <froslie at gmail.com>:
> No problem, thanks for taking the time.
>
> I'm actually trying to resolve this error now:
>
>    buff.append(" ".join(lookup(Word) for Word in line.split()))
> NameError: global name 'lookup' is not defined
>
> ..also assume I need to change 'Word' to something that checks the next word
> in the text file and then replaces it with the one that is looked up..
> working on that now.
>
> Pete F

lookup() is the function that looks up the word in the thesaurus.  I
left implementing that as an exercise for you, as I don't know the
format of the reference you're using.
-- 
Richard "Roadie Rich" Lovely, part of the JNP|UK Famile
www.theJNP.com


More information about the Tutor mailing list