ssecorp wrote:
in read2 it never quits when I write quit, why?

def read():
    expr = raw_input("Lisp> ")
    if expr != "quit":
        print parse(expr)
        read()
    else:
        print "Good session!"

def read2():
    expr = ""
    while expr != "quit":
        expr = raw_input("Lisp> ")
        print parse(expr)
        read2()
    print "Good session!"

That's because read2() is being called recursively making expr be always a blank string the first time you go through the loop. Delete the call to read2() that is inside your while loop and try.

-Larry
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to