[Python-3000] Droping find/rfind?

Guido van Rossum guido at python.org
Fri Aug 25 17:48:34 CEST 2006


On 8/25/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> Aside from the scheduled removal of buffer in 3.x, I see no particular
> issue with offering a bytes view and str view in 3.x via two specific
> bytes and str subtypes.  With care, very few changes if any would be
> necessary in the str (unicode) implementation, and the bytesview
> consistancy updating is already being done with current buffer objects.
>
> >From there, the only quesion is when an operation on a bytes or str
> object should return such a view, and the answer would be never.  Return
> views from view objects, the non-views from non-view objects.  If you
> want views, wrap your original object with a view, and call its methods.
> If you need a non-view, call the standard bytes/str constructor.

For the record, I think this is a major case of YAGNI. You appear way
to obsessed with performance of some microscopic aspect of the
language. Please stop firing random proposals until you actually have
working code and proof that it matters. Speeding up microbenchmarks is
irrelevant.

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


More information about the Python-3000 mailing list