StringEnd() raises exception when match fails - PyParsing
===

this prints `pass`

    pattern = Word(alphanums) + StringEnd()
    str=" bar "
    results = pattern.parseString(str)
    if 1 == len(results) && "bar" == results[0] :
        print("pass")
    else:
        print("fail")

but this throws and exception in `parseImpl` of `class StringEnd`:

    pattern = Word(alphanums) + StringEnd()
    str=" bar foo "
    results = pattern.parseString(str)  # <-- exception raised

I would expect the 2nd parseString call to just return an empty array, as it would obviously fail to match.

Can anyone help me understand why?

(should be obvious, but to run you'll need 'from pyparsing import *'; also I'm on python3.2 and pyparsing 1.5.6)