◐ Shell
clean mode source ↗

Message 349415 - Python tracker

Quick question:  Is there a reason that requires() and files() return iterators instead of lists?  ISTM that a list-based solution would be more usable than returning a starmap() object or somesuch.  I suspect almost every user would have to call list(files(package)) rather than files(package).  An iterator return type would only make sense if we need the values are produces lazily or if a known consumer required an iterator input.

Also consider changing the parameter from files(package) to files(package_name).  When I first tried-out this API, I typed:  "import requests; files(requests)" instead of "files('requests')".

Sorry to bring this up at a late stage, but the purpose of a beta release is to let other users try-out the API while there is still a chance to make adjustments.