[Python-Dev] Cost-Free Slice into FromString constructors--Long

Guido van Rossum guido at python.org
Thu May 25 17:30:33 CEST 2006


On 5/25/06, Sean Reifschneider <jafo-python-dev at tummy.com> wrote:
> Conversion functions taking a start and end are the low-hanging fruit, but
> I think in the long term something that does that described I would prefer.
> I believe that Martin is expecting expecting to have something this week
> to try.

I'm -1 on this. It adds considerable API complications for something
that 99.99% of users can do without regrets by using a slice. Yes, I
know regex and string searches already have this API complication.
They have a much more important use case. I don't want every API that
takes a string argument to also take slice arguments; then everybody
ends up doing duplicate work.

If you really need this for speed, I recommend you make it a custom extension.

-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)


More information about the Python-Dev mailing list