3 ms·
I had a quick look, but I didn't see filtering expressions, only shaping expressions. It seems like glom is more of a result shaper/mapper. Can you filter wit
by sixdimensional 8y ago
I had a quick look, but I didn't see filtering expressions, only shaping expressions. It seems like glom is more of a result shaper/mapper. Can you filter with glom (maybe with lambdas or something)? I could see the two going together quite well if you were "glomming" a big Python object.
- mhashemi 8y agoFiltering is supported through the OMIT value: http://glom.readthedocs.io/en/latest/api.html#glom.OMIT http://glom.readthedocs.io/en/latest/api.html#glom.OMIT (another example: http://glom.readthedocs.io/en/latest/snippets.html#filtered-iteration http://glom.readthedocs.io/en/latest/snippets.html#filtered-... ) Lambdas and functions are always a safe fallback, but glom does its best to keep your specs readable and roundtrippable (gotta love a nice repr()).
- sixdimensional 8y agoThat's cool! Thank you for pointing it out!