nerdocs / pydifact

A python EDIFACT library.
MIT License
156 stars 45 forks source link

Add an optional predicate filter to `get_segment` and `get_segments` #32

Closed JocelynDelalande closed 4 years ago

JocelynDelalande commented 4 years ago

This is a helper to ease the kind of parsing (semi-manual searching) that pydifact allows.

nerdoc commented 4 years ago

This is a very nice trick, b< using lambda callables instead of regexing etc. Really well done. I'll merge this PR, however, It should be done some documentation how to use it properly, just an lambda example like in the tests.