[Python-ideas] Possible new itertool: comm()
Andrew Barnert
abarnert at yahoo.com
Tue Jan 6 19:59:08 CET 2015
On Jan 6, 2015, at 18:29, Paul Moore <p.f.moore at gmail.com> wrote:
> On 6 January 2015 at 17:39, Andrew Barnert <abarnert at yahoo.com> wrote:
>>> 2. The times I've needed this have been ad-hoc scripts (I'm on
>>> Windows, so while a Unix user might use a quick shell pipeline with
>>> comm, that's less convenient for me) where depending on a 3rd party
>>> distribution from PyPI is less ideal.
>>
>> Why? Current standard Windows installers include pip, and being pure Python you won't need a compiler, so what's wrong with requiring a PyPI distribution? (Of course that means you need to be able to count on a relatively recent Python 3.4+/2.7+, but it's hard to see how that's worse than something in a future version of the stdlib, which would mean you need to be able to count on 3.5+.)
>
> Well, I usually write my "little utility scripts" as simple .py files
> to be run with the system Python. I tend to use them on multiple
> machines. So unless a dependency is one of the modules I routinely
> install (things like requests) the process goes run script, oops,
> needed that distribution, pip install dist, run it again.
I do the same thing; I just long ago got into the habit of including more-itertools as one of my routine installs alongside requests, etc. :)
I wonder if there's a common-enough set of things that don't really belong in stdlib (often just because they update too frequently) but are often worth having for many people. If I could just "pip install extralib" on every machine, even at the cost of getting a few libs I don't actually need, it would be worth it. On the other hand, if the common set isn't common enough, so for many people extralib only had half of what they want and was 70% stuff they didn't care shouted it wouldn't be that useful...
> Not a big
> issue certainly (and hardly a showstopper) but annoying. And it does
> mean I'd need to make a PyPI project for my personal utility
> functions, which doesn't really seem an appropriate use for PyPI, tbh.
>
> Requiring Python 3.5+ isn't a big deal, I routinely put the newest
> version of Python on all my machines. The ones I can't tend to be
> "secure", meaning I have no access to PyPI either :-(
>
>> And I'll bet if you submit this as a pull request to more-itertools, it'll be accepted, meaning you don't even have to create or maintain a PyPI project.
>
> Thanks for the suggestion, I might do that.
>
> Paul
More information about the Python-ideas
mailing list