pyparsing v4.1.1 Release Notes
Release Date: 2019-07-25 // almost 5 years ago-
๐ This is a re-release of version 2.4.1 to restore the release history
๐ in PyPI, since the 2.4.1 release was deleted.๐ There are 3 known issues in this release, which are fixed in
the upcoming 2.4.2:๐ API change adding support for
expr[...]
- the original
code in 2.4.1 incorrectly implemented this as OneOrMore.
Code using this feature under this relase should explicitly
๐ useexpr[0, ...]
for ZeroOrMore andexpr[1, ...]
for
OneOrMore. In 2.4.2 you will be able to writeexpr[...]
equivalent toZeroOrMore(expr)
.๐ Bug if composing And, Or, MatchFirst, or Each expressions
using an expression. This only affects code which uses
explicit expression construction using the And, Or, etc.
classes instead of using overloaded operators '+', '', and
so on. If constructing an And using a single expression,
๐ you may get an error that "cannot multiply ParserElement by
0 or (0, 0)" or a PythonIndexError
. Change code likecmd = Or(Word(alphas))
to
cmd = Or([Word(alphas)])
๐ (Note that this is not the recommended style for constructing
Or expressions.)Some newly-added
__diag__
switches are enabled by default,
โ which may give rise to noisy user warnings for existing parsers.
You can disable them using:import pyparsing as pp pp. __diag__.warn_multiple_tokens_in_named_alternation = False pp. __diag__.warn_ungrouped_named_tokens_in_collection = False pp. __diag__.warn_name_set_on_empty_Forward = False pp. __diag__.warn_on_multiple_string_args_to_oneof = False pp. __diag__.enable_debug_on_named_expressions = False
0๏ธโฃ In 2.4.2 these will all be set to False by default.