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

skip at pobox.com skip at pobox.com
Mon Dec 15 15:11:58 CET 2008


    Guido> We're not going to introduce backwards incompatibilities or
    Guido> deprecate existing usage of str.split() with or without arguments
    Guido> are we?

As the OP, I long ago (in terms of number of posts on the topic) gave up on
the thought that the str.split() API might change.  Someone suggested this
idiom:

    [elt for elt in s.split(",") if elt]

which I will adopt (with a comment explaining why it's necessary).

Skip



More information about the Python-ideas mailing list