Re: a splitting headache

Discussion in 'Python' started by John Posner, Oct 22, 2009.

  1. John Posner

    John Posner Guest

    [resend, with Subject line corrected and formatting crud deleted]

    Mensanator wrote:
    > That's interesting. If string.splitfields(delim) was equivalent to
    > str.split(sep), it would have been useful to add the phrase
    > "str.split(sep) is equivalent to the old string.splitfields(delim)
    > which no longer exists." to the docs. That way, a search on
    > "splitfields" would direct the user to str.split(sep) rather than
    > simply throw a dialog box saying "No topics found". No one ever
    > considers making life easy for the user.
    >


    I'm not sure what Python documentation you're consulting. I have Python
    2.6.3rc1 on Windows XP. I launched the ...\doc\python263c1.chm help
    file, and searched for "splitfields". Here's what I got:

    string.splitfields(/s/[, /sep/[, /maxsplit/]])
    This function behaves identically to split(). (In
    the past, split() was only used with one argument,
    while splitfields() was only used with two
    arguments.)


    -John
    John Posner, Oct 22, 2009
    #1
    1. Advertising

  2. John Posner

    Mensanator Guest

    On Oct 22, 4:35 pm, John Posner <> wrote:
    > [resend, with Subject line corrected and formatting crud deleted]
    >
    > Mensanator wrote:
    > > That's interesting. If string.splitfields(delim) was equivalent to
    > > str.split(sep), it would have been useful to add the phrase
    > > "str.split(sep) is equivalent to the old string.splitfields(delim)
    > > which no longer exists." to the docs. That way, a search on
    > > "splitfields" would direct the user to str.split(sep) rather than
    > > simply throw a dialog box saying "No topics found". No one ever
    > > considers making life easy for the user.

    >
    > I'm not sure what Python documentation you're consulting. I have Python
    > 2.6.3rc1 on Windows XP. I launched the ...\doc\python263c1.chm help
    > file, and searched for "splitfields". Here's what I got:
    >
    >  string.splitfields(/s/[, /sep/[, /maxsplit/]])
    >    This function behaves identically to split(). (In
    >    the past, split() was only used with one argument,
    >    while splitfields() was only used with two
    >    arguments.)


    I got "No Topics Found" in the 3.1 docs. Still, the possibility
    exists that someone has an old Python source code that they want
    to convert to 3.1. I for one, never had a copy of Python 1.3.

    >
    > -John
    Mensanator, Oct 22, 2009
    #2
    1. Advertising

  3. En Thu, 22 Oct 2009 19:45:54 -0300, Mensanator <>
    escribió:
    > On Oct 22, 4:35 pm, John Posner <> wrote:
    >> Mensanator wrote:
    >> > That's interesting. If string.splitfields(delim) was equivalent to
    >> > str.split(sep), it would have been useful to add the phrase
    >> > "str.split(sep) is equivalent to the old string.splitfields(delim)
    >> > which no longer exists." to the docs.

    >> I'm not sure what Python documentation you're consulting.

    >
    > I got "No Topics Found" in the 3.1 docs. Still, the possibility
    > exists that someone has an old Python source code that they want
    > to convert to 3.1. I for one, never had a copy of Python 1.3.


    Those relics from the past has been removed in Python 3.x (in both code
    and documentation). Also, all notes like 'New in version 1.x' or 'New in
    version 2.x' have been removed too.

    --
    Gabriel Genellina
    Gabriel Genellina, Oct 23, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Ericson
    Replies:
    0
    Views:
    419
    John Ericson
    Jul 19, 2003
  2. Mark
    Replies:
    0
    Views:
    433
  3. Mensanator

    a splitting headache

    Mensanator, Oct 16, 2009, in forum: Python
    Replies:
    29
    Views:
    580
    Mensanator
    Oct 26, 2009
  4. John Posner

    Re: a splitting headache

    John Posner, Oct 22, 2009, in forum: Python
    Replies:
    3
    Views:
    297
    Mensanator
    Oct 22, 2009
  5. Replies:
    25
    Views:
    234
    Anno Siegel
    Jun 13, 2005
Loading...

Share This Page