On Aug 1, 2019, at 10:48, Eli Berkowitz email@example.com wrote:
In terms of an argument for why it should be included, for most Python users the itertools recipes remain unseen.
Sure. But do you also know all of the functions in the module? Would you notice or a new one got added? In practical terms, how much more discoverable is groupby than grouper?
I do occasionally search for things I think might be there by importing a module in the interactive interpreter and trying help or auto-complete. But I think I go to the docs, or a search engine, or StackOverflow, a lot more often.
That being said, it isn’t zero benefit.
Plus, there is another potential argument for adding at least some of the recipes to the module. When I show a novice how to import and use cycle, they they get excited and go off and use it. When I show them how to copy and paste grouper, they sometimes seem reluctant—I’m encouraging them to put code they don’t understand into their source files. (And, while explaining how and why grouper works is a great teaching opportunity for some really important concepts, that’s not always the top priority at the time…) So I usually tell them to pip install more-itertools and use that, and mention the recipes so they can maybe read them later