[Python-ideas] add a time decorator to timeit.py

Chris Angelico rosuav at gmail.com
Sun Oct 7 08:44:20 EDT 2018


On Sun, Oct 7, 2018 at 11:34 PM Steven D'Aprano <steve at pearwood.info> wrote:
> Unfortunately, not every good idea can or will make it into the std lib.
> Even if the idea is good, we might decide that it belongs as a third-
> party library, or that the benefit is not enough to make up for the cost
> in effort or complexity. Or the idea is simply too controversial.

Or just too detaily. The given function has four keyword arguments
that vary its behaviour slightly; if it gets into the stdlib, someone
will ask for a way to control the output format, someone else will
request that it be able to send to stderr instead of stdout, etc, etc,
and suddenly the proposed function has two dozen kwargs. One of the
powerful tools available to a programmer is having *your own* debug
library, without having to worry about what other people would do that
might be similar.

-0.5 on adding to the stdlib, -0 on putting on PyPI (I wouldn't bother
looking on PyPI for something like this - I'd just write my own,
specific to the need).

ChrisA


More information about the Python-ideas mailing list