a splitting headache

rurpy at yahoo.com rurpy at yahoo.com
Thu Oct 22 21:28:44 CEST 2009


On 10/22/2009 07:17 AM, David C. Ullrich wrote:
> On Wed, 21 Oct 2009 14:43:48 -0700 (PDT), Mensanator
> <mensanator at aol.com> wrote:
>
>>On Oct 21, 2:46 pm, David C Ullrich <dullr... at sprynet.com> wrote:
>>> On Tue, 20 Oct 2009 15:22:55 -0700, Mensanator wrote:
>>> > On Oct 20, 1:51 pm, David C Ullrich <dullr... at sprynet.com> wrote:
>>> >> On Thu, 15 Oct 2009 18:18:09 -0700, Mensanator wrote:
[...]
>>> Have you _read_ the docs?
>>
>>Yes.
>>
>>> They're quite clear on the difference
>>> between no sep (or sep=None) and sep=something:
>>
>>I disagree that they are "quite clear". The first paragraph makes no
>>mention of leading or trailing delimiters and they show no example
>>of such usage. An example would at least force me to think about it
>>if it isn't specifically mentioned in the paragraph.
>>
>>One could infer from the second paragraph that, as it doesn't return
>>empty stings from leading and trailing whitespace, slpit(sep) does
>>for leading/trailing delimiters. Of course, why would I even be
>>reading
>>this paragraph when I'm trying to understand split(sep)?
>
> A skightly less sarcastic answer than what I just posted:
>
> I don't see why you _should_ need to read the second paragraph
> to infer that leading delimiters will return empty strings when
> you do split(sep). That's exactly what one would expect!

It is very dangerous for a documentation writer
to decide not to document something because, "that's
what everyone would expect".  It relies on the
writer actually knowing what everyone would expect
which, given the wide range of backgrounds and
experience of the readers, is asking a lot.
Just look at the different expectation of how
Python should work expressed in posts to this
group by people coming from other languages.




More information about the Python-list mailing list