mahmoud / glom

☄️ Python's nested data operator (and CLI), for all your declarative restructuring needs. Got data? Glom it! ☄️
https://glom.readthedocs.io
Other
1.89k stars 61 forks source link

First() isn't very discoverable #202

Open ckp95 opened 3 years ago

ckp95 commented 3 years ago

I didn't realize that First() existed until I went poking around in the source today. First(predicate) is a nice shortcut for Iter().first(predicate), but it isn't mentioned in the "Streaming & Iteration" part of the docs. Also it isn't in the main glom namespace, you have to import it via glom.streaming.

It would be nice to be able to do from glom import First and also have its existence mentioned in the main docs next to Iter().