glom
glom copied to clipboard
First() isn't very discoverable
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()
.