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

list spec preserve laziness / generator-ness of target #194

Open kurtbrose opened 4 years ago

kurtbrose commented 4 years ago

just had a thought -- not sure if this is feasible but probably worth looking into

it would be great if [subspec] simply preserved the laziness of the target it is getting evaluated over -- so glom() would return an iterator if it was handed an iterator, and a list if handed a list

this seems much more convenient than making streaming into a separate sub-system