What am I doing wrong here?

Bill C. Wong vze3brfe at verizon.net
Sun Jun 29 22:42:11 EDT 2003


################################
def func( s ):
    s1, s2 = s.split( ' ', 1 )
    try:
        raise s1
    except "aaaa":
        print 'except "aaaa"'
    except:
        print 'except:'

s = "aaaa "
func( s )
################################
If I manually assign s1 with s1 = "aaaa", then it works fine! What am I
doing wrong here?






More information about the Python-list mailing list