[Python-3000] Droping find/rfind?
jimjjewett at gmail.com
Fri Aug 25 18:55:33 CEST 2006
On 8/25/06, Josiah Carlson <jcarlson at uci.edu> wrote:
> 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.
I do like the idea of permitting multiple string *implementations*,
some of which might store their characters elsewhere, as lists and
large tables do.
But this needs to be an automatic implementation detail, like the
distiction between int and long. If the choice must be explicit, then
people who worry too much about speed will start wrapping all string
references in view(). This is worse (and more tempting) then the
default-argument len=len hack.
More information about the Python-3000