osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Stdlib, what's in, what's out


On Tuesday, September 19, 2017 at 1:05:51 AM UTC-7, Stefan Behnel wrote:
> John Ladasky schrieb am 19.09.2017 um 08:54:
> > I have come to understand from your other posts that adding something to
> > the stdlib imposes significant constraints on the release schedules of
> > those modules.  I can appreciate the hassle that might cause.  Still,
> > now I wonder what I might be missing.
> 
> There are many packages on PyPI that reimplement functionality of the
> stdlib in some "better" way, by their own definition of "better". Some are
> faster, some are more feature-rich, some have a better API, some focus on
> making specific special cases faster/easier/whatever.

And of course I have found some other third-party packages: scipy, pandas, matplotlib, and PyQt5 are important for my work.  I helped a student of mine get selenium running.  In the case of PyQt, I found TKinter unsatisfactory many years ago, and went looking for better choices.  I used wxPython first, when I was working in Py2.  When wxPython was slow to migrate to Py3, I went searching again.

> The stdlib is there to provide a base level of functionality. That base
> level tends to be much higher up than in most other programming languages,

Very much agreed.

> but from the point of view of Python, it's still just a base level, however
> comfortable it might be.
> 
> If you need specific features, more speed, can't live with a certain API or
> feel that you are wasting too much developer time by doing something the
> way you always did it, 

And that's the tricky part.  Maybe there's a better way out there that is helping other programmers, but it isn't well-publicized.  Say what you want about the hassle it imposes on package developers, but the best advertisement is having your package in the stdlib where everyone will see it.

> If you can live with what the stdlib provides, stick to it. Keeping foreign
> dependencies low is also "better" in some cases.

Also agreed.  Thankfully, my code doesn't run on any machines more than two doors down from my office.  And although it has to run on Windows, Linux, and Mac, I can get my hands on every machine and install the packages my users need.