I've just noticed that the bisect module lacks of the key parameter.
The documentation points to a recipe that could be used to handle a sorted
collection, but I think it's an overkill if I want to bisect my sequence only
once or twice with a key. Having something like `bisect(sequence,
I've just noticed that the bisect module lacks of the key parameter.
...
Is there some reason behind this lack?
See full discussion at http://bugs.python.org/issue4356. Guido said it's going
in, however there's no time frame for it.
--
http://mail.python.org/mailman/listinfo/python-list
Il giorno mercoledì 12 settembre 2012 17:54:31 UTC+2, Giacomo Alzetta ha
scritto:
I've just noticed that the bisect module lacks of the key parameter.
The documentation points to a recipe that could be used to handle a sorted
collection, but I think it's an overkill if I want to bisect
Il giorno mercoledì 12 settembre 2012 18:05:10 UTC+2, Miki Tebeka ha scritto:
I've just noticed that the bisect module lacks of the key parameter.
...
Is there some reason behind this lack?
See full discussion at http://bugs.python.org/issue4356. Guido said it's
going in, however
Correct me if I'm wrong, but the reason for this absence is that people could
think that doing repeated bisects using keys would be fast, even though keys
has to be recomputed?
I think the main point Raymond had was:
If we added key= to bisect, it would encourage bad design and steer