[Tutor] Standard Library Performance (3.4.1)

Stefan Behnel stefan_ml at behnel.de
Fri Oct 24 14:01:51 CEST 2014


Alan Gauld schrieb am 24.10.2014 um 13:03:
> Not all library modules are C based however so it doesn't
> always apply. But they are usually optimised and thoroughly
> debugged so it is still worth using them rather than building
> your own.

It's worth stressing this point a bit more. Lots of people have been using
this code, and some found bugs in it that are now fixed. This means that
whatever implementation of similar functionality you can come up with
yourself will most likely have more bugs and be less generally versatile.
And even if the standard library code doesn't fit your needs, start by
taking a deep look at what the Python Package Index (PyPI) offers instead
of writing your own.

Developer time is much better spent reusing other people's code and helping
to squash the remaining bugs in it than having everyone write their own
buggy code over and over.

Stefan




More information about the Tutor mailing list