[Tutor] Can you see my error?

DavidCraig@pia.ca.gov DavidCraig@pia.ca.gov
Fri, 03 Aug 2001 14:08:09 -0700


I input ..............to
#-----------------------------------------------------------
#           Main Program
#------------------------------------------------------------

gKeys = map(lambda x:regex.compile(x[0]),gPats)
gValues = map(lambda x:x[1],gPats)

print "Therapist \n------------"
print "Talk to the program by typing in plain English, using normal upper-"
print 'and lower-case letters and punctuation.  Enter "quit" when done.'
print '='*72
print "Hello.  How are you feeling today?"
s = ""
while s != "quit":
    try: s = raw_input(">")
    except EOFError:
        s = "quit"
        print s
    while s[-1] in "!.": s = s[:-1]
    print respond(s,gKeys,gValues)

The message I get is:

>>>
Traceback (most recent call last):
  File "C:/Python21/Practice/therapist1.py", line 273, in ?
    gKeys = map(lambda x:regex.compile(x[0]),gPats)
  File "C:/Python21/Practice/therapist1.py", line 273, in <lambda>
    gKeys = map(lambda x:regex.compile(x[0]),gPats)
error: Badly placed parenthesis

Any help would be appreciated.

Thanks in advance.

Dave

D. H. Craig, CSM