The better question is, do I ever use them? Thinking back over the code I've written in the last couple of years, I would say probably two or three times (mostly in unit tests).  I've had to code around string's sequence behavior DOZENS of times.  Is it nifty that strings can be sliced like that?  Sure.  In general my experience has been that the string methods (and some misc functions in other modules) do a better job in simple cases, and regular expressions do a better job in complex cases.  I just don't see string slicing having utility that is irreplaceable, and it is bug-inducing in many cases, or at the very least it can propagate programming errors way down stream.<div>
<br></div><div> Ultimately, I highly doubt it's going anywhere, so it's a moot point.  I definitely feel that python is trading real usability for "flash" with string slicing though.</div><div><div><br><div class="gmail_quote">
On Tue, Jul 13, 2010 at 8:48 PM, Aahz <span dir="ltr"><<a href="mailto:aahz@pythoncraft.com">aahz@pythoncraft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
[Original not available on my swerver, responding here]<br>
<div class="im"><br>
>On 7/11/10 10:03 PM, Nathan Rice wrote:<br>
>><br>
>> Yeah, I long ago filed the in place place in the same folder as<br>
>> strings-as-sequences, all() returning True for an empty iterable and any<br>
>> returning True rather than the thing which triggered it.<br>
<br>
</div>Because I love to repeat myself:<br>
<br>
"...string iteration isn't about treating strings as sequences of strings,<br>
it's about treating strings as sequences of characters.  The fact that<br>
characters are also strings is the reason we have problems, but characters<br>
are strings for other good reasons."  --Aahz<br>
<a href="http://mail.python.org/pipermail/python-3000/2006-April/000897.html" target="_blank">http://mail.python.org/pipermail/python-3000/2006-April/000897.html</a><br>
<br>
Do you really want to give up Python's lovely string-slicing<br>
capabilities?<br>
<font color="#888888">--<br>
Aahz (<a href="mailto:aahz@pythoncraft.com">aahz@pythoncraft.com</a>)           <*>         <a href="http://www.pythoncraft.com/" target="_blank">http://www.pythoncraft.com/</a><br>
<br>
"....Normal is what cuts off your sixth finger and your tail..."  --Siobhan<br>
</font><div><div></div><div class="h5">--<br>
<a href="http://mail.python.org/mailman/listinfo/python-list" target="_blank">http://mail.python.org/mailman/listinfo/python-list</a><br>
</div></div></blockquote></div><br></div></div>