[Python-ideas] This seems like a wart to me...

Matthew Russell matt.horizon5 at gmail.com
Thu Dec 11 21:42:28 CET 2008


Sorry for wasting your brain power -
I just read through some of my code and realised how stupid an idea it
really was... I haven't even got the excuse of being remotely new to the
language (or programming in general come to think of it)

lesson(self): dont_post_at_end_of_day_without(thinking_a_lot_first)

sorrly-mistaken-and-embarrassed
Matt

2008/12/11 Bruce Leban <bruce at leapyear.org>

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


-- 
Cheers,
Matt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20081211/477c1d86/attachment.html>


More information about the Python-ideas mailing list