A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/1999-June/095372.html below:

[Python-Dev] String methods... finally

[Python-Dev] String methods... finally [Python-Dev] String methods... finallyTim Peters tim_one at email.msn.com
Fri Jun 11 05:33:25 CEST 1999
> Two new methods startswith and endswith act like their Java cousins.

Barry, suggest that both of these grow optional start and end slice indices.
Why?  It's Pythonic <wink>.  Really, I'm forever marching over huge strings
a slice-pair at a time, and it's important that searches and matches never
give me false hits due to slobbering over the current slice bounds.  regexp
objects in general, and string.find/.rfind in particular, support this
beautifully.  Java feels less need since sub-stringing is via cheap
descriptor there.  The optional indices wouldn't hurt Java, but would help
Python.

then-again-if-strings-were-so-great-i'd-switch-to-tcl<wink>-ly y'rs  - tim




More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4