pyparsing v1.5.2 Release Notes

Release Date: 2009-04-01 // about 15 years ago
    • โž• Added pyparsing_py3.py module, so that Python 3 users can use pyparsing by changing their pyparsing import statement to:

      import pyparsing_py3

    Thanks for help from Patrick Laban and his friend Geremy Condra on the pyparsing wiki.

    • Removed slots declaration on ParseBaseException, for compatibility with IronPython 2.0.1. Raised by David Lawler on the pyparsing wiki, thanks David!

    • ๐Ÿ›  Fixed bug in SkipTo/failOn handling - caught by eagle eye cpennington on the pyparsing wiki!

    • ๐Ÿ›  Fixed second bug in SkipTo when using the ignore constructor argument, reported by Catherine Devlin, thanks!

    • ๐Ÿ›  Fixed obscure bug reported by Eike Welk when using a class as a ParseAction with an errant getitem method.

    • ๐Ÿ“œ Simplified exception stack traces when reporting parse exceptions back to caller of parseString or parseFile - thanks to a tip from Peter Otten on comp.lang.python.

    • ๐Ÿ”„ Changed behavior of scanString to avoid infinitely looping on expressions that match zero-length strings. Prompted by a question posted by ellisonbg on the wiki.

    • โœจ Enhanced classes that take a list of expressions (And, Or, MatchFirst, and Each) to accept generator expressions also. This can be useful when generating lists of alternative expressions, as in this case, where the user wanted to match any repetitions of '+', '*', '#', or '.', but not mixtures of them (that is, match '+++', but not '+-+'):

      codes = "+*#." format = MatchFirst(Word(c) for c in codes)

    Based on a problem posed by Denis Spir on the Python tutor list.

    • โž• Added new example eval_arith.py, which extends the example simpleArith.py to actually evaluate the parsed expressions.