I think splitting an empty string is more like dividing zero in half. No one expects that to raise a value exception.<br><br>--- Bruce<br><br><div class="gmail_quote">On Thu, Dec 11, 2008 at 12:14 PM, Guido van Rossum <span dir="ltr"><<a href="mailto:guido@python.org">guido@python.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Thu, Dec 11, 2008 at 12:11 PM, Matthew Russell<br>
<<a href="mailto:matt.horizon5@gmail.com">matt.horizon5@gmail.com</a>> wrote:<br>
> It seems to me like spliting an empty string is something that makes little<br>
> sense to do,<br>
> similar to dividing by zero in terms of an analogy.<br>
<br>
</div>I guess you have never had the need. Let me assure you that you are<br>
mistaken. :-)<br>
<div class="Ih2E3d"><br>
> How about str.split, partition and friends just raise ValueError exception<br>
> when the value is the empty string?<br>
<br>
</div>Absolutely not.<br>
<div class="Ih2E3d"><br>
> Regards,<br>
> Matt<br>
><br>
> 2008/12/11 Terry Reedy <<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>><br>
>><br>
>> Guido van Rossum wrote:<br>
>>><br>
>>> On Thu, Dec 11, 2008 at 6:18 AM,  <<a href="mailto:skip@pobox.com">skip@pobox.com</a>> wrote:<br>
>><br>
>>> If anything it's wrong, it's that they share the same name. This<br>
>>> wasn't always the case. Do you really want to go back to .split() and<br>
>>> .splitfields(sep)?<br>
>><br>
>> I hope not.  I consider the current situation to be a definite<br>
>> improvement.  I sometimes forgot which was which.<br>
>><br>
>> _______________________________________________<br>
>> Python-ideas mailing list<br>
>> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
>> <a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
><br>
><br>
><br>
><br>
> _______________________________________________<br>
> Python-ideas mailing list<br>
> <a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
> <a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
><br>
><br>
<br>
<br>
<br>
</div><div class="Ih2E3d">--<br>
--Guido van Rossum (home page: <a href="http://www.python.org/%7Eguido/" target="_blank">http://www.python.org/~guido/</a>)<br>
_______________________________________________<br>
</div><div><div></div><div class="Wj3C7c">Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</div></div></blockquote></div><br>