Python Doc Problem Example: os.path.split

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Xah Lee

    Python Doc Problem Example: os.path.split

    Python Doc Problem Example

    Quote from:
    Source code: Lib/genericpath.py, Lib/posixpath.py(for POSIX) and Lib/ntpath.py(for Windows). This module implements some useful functions on pathnames. To read or write files see open(), and for ac...

    ----------
    split( path)
    Split the pathname path into a pair, (head, tail) where tail is the
    last pathname component and head is everything leading up to that. The
    tail part will never contain a slash; if path ends in a slash, tail
    will be empty. If there is no slash in path, head will be empty. If
    path is empty, both head and tail are empty. Trailing slashes are
    stripped from head unless it is the root (one or more slashes only). In
    nearly all cases, join(head, tail) equals path (the only exception
    being when there were multiple slashes separating head from tail).
    ----------

    Can anyone tell me what this verbiage is trying to fucking say?

    what the fuck is with the head and tail thing?

    is the doc writer, trying to write the doc with some austereness, but
    is confused about the behavior of split, or confused about expressing
    it? Did his pretension fucked him up?

    i was working on a program where i needed to split a path into dirname,
    corename, and suffix. But this fucking python doc diverted my work and
    wasted my time. It normally isn't a problem to find imperfections in
    the world except the fucking OpenSourcers fuck with their fucking
    moronicity and moronitude and propagate haughtily their fucking lies
    and stupidity. Die.

    Suggested rewrite:

    split(path)
    returns a pair (dirname,filena me), where dirname is the part of path
    up to the last slash, and filename is the rest of the string after the
    last slash.

    Exceptional cases are:
    • if path is a single slash (or repeated), then path == dirnameand
    filename is empty.
    • If the “last” slash is repeated, they are treatedas one single
    slash.

    ------------
    Fuck the motherfucking liers of OpenSourcing fuckheads.
    (Note: my use of OpenSource here does not include people of GNU
    community.)

    For more about Python Doc problems, see


    Xah
    xah@xahlee.org
    ∑ http://xahlee.org/

  • Steven D'Aprano

    #2
    Re: Python Doc Problem Example: os.path.split

    On Sun, 18 Sep 2005 03:46:03 -0700, Xah Lee wibbled:
    [color=blue]
    > Can anyone tell me what this verbiage is trying to fucking say?[/color]

    Please don't feed the trolls.

    In other words, if everybody ignores this loser, he might crawl back under
    the rock he came from.

    --
    Steven.

    Comment

    • Laszlo Zsolt Nagy

      #3
      Re: Python Doc Problem Example: os.path.split

      [color=blue]
      >is the doc writer, trying to write the doc with some austereness, but
      >is confused about the behavior of split, or confused about expressing
      >it? Did his pretension fucked him up?
      >
      >[/color]
      Dear Xah Lee,

      The Python community is very sorry because we have a very bad
      documentation. You are right. The documentation is bad, and the language
      is bad etc. The mailing list itself is not helpful and you cannot use it
      for anything. We will try to follow all of your glorious suggestions.
      But we have so many things to do, I'm affraid you need to wait until
      Python 5000 is released. Until that, I can recommend you the Visual
      Basic language. Its documentation is much more perfect. MSDN is really
      really well structured and easy to use! It is commercial, and - as you
      would expect - you will get immediate fixes after you make a kind
      suggestion like this. I think this is the best thing you can do.

      For more information about this fabolous ClosedSource commercial
      product, please visit this link:



      Good Luck!

      Les

      Comment

      • Matija Papec

        #4
        Re: Python Doc Problem Example: os.path.split

        X-Ftn-To: Xah Lee

        "Xah Lee" <xah@xahlee.org > wrote:[color=blue]
        >Python Doc Problem Example[/color]

        what makes you sure that this problem would be interesting for groups beside
        c.l.python? are you begging to be converted to a true religion? :-)


        --
        Matija

        Comment

        • Bruno Desthuilliers

          #5
          Re: Python Doc Problem Example: os.path.split

          Laszlo Zsolt Nagy a écrit :[color=blue]
          >[color=green]
          >> is the doc writer, trying to write the doc with some austereness, but
          >> is confused about the behavior of split, or confused about expressing
          >> it? Did his pretension fucked him up?
          >>
          >>[/color]
          > Dear Xah Lee,
          >
          > The Python community is very sorry because we have a very bad
          > documentation. You are right. The documentation is bad, and the language
          > is bad etc. The mailing list itself is not helpful and you cannot use it
          > for anything. We will try to follow all of your glorious suggestions.
          > But we have so many things to do, I'm affraid you need to wait until
          > Python 5000 is released. Until that, I can recommend you the Visual
          > Basic language. Its documentation is much more perfect. MSDN is really
          > really well structured and easy to use! It is commercial, and - as you
          > would expect - you will get immediate fixes after you make a kind
          > suggestion like this. I think this is the best thing you can do.
          >
          > For more information about this fabolous ClosedSource commercial
          > product, please visit this link:
          >
          > http://msdn.microsoft.com/vbasic/
          >
          > Good Luck!
          >
          > Les
          >[/color]
          KEYBOARD !

          Comment

          • Julian Fondren

            #6
            Re: Python Doc Problem Example: os.path.split

            > Please don't feed the trolls.
            [color=blue]
            > In other words, if everybody ignores this loser, he might crawl back under
            > the rock he came from.[/color]

            Well, comp.lang.pytho n people would do better to accept the suggested
            rewrite and ignore at the rest at their discretion.

            Comment

            • George Sakkis

              #7
              Re: Python Doc Problem Example: os.path.split

              Another epileptic seizure on the keyboard. Apart from clue deficit
              disorder, this guy seems to suffer from some serious anger management
              problems...*plo nk*


              "Xah Lee" <xah@xahlee.org > wrote:[color=blue]
              > Python Doc Problem Example
              >
              > Quote from:
              > http://docs.python.org/lib/module-os.path.html
              > ----------
              > split( path)
              > Split the pathname path into a pair, (head, tail) where tail is the
              > last pathname component and head is everything leading up to that. The
              > tail part will never contain a slash; if path ends in a slash, tail
              > will be empty. If there is no slash in path, head will be empty. If
              > path is empty, both head and tail are empty. Trailing slashes are
              > stripped from head unless it is the root (one or more slashes only). In
              > nearly all cases, join(head, tail) equals path (the only exception
              > being when there were multiple slashes separating head from tail).
              > ----------
              >
              > Can anyone tell me what this verbiage is trying to fucking say?
              >
              > what the fuck is with the head and tail thing?
              >
              > is the doc writer, trying to write the doc with some austereness, but
              > is confused about the behavior of split, or confused about expressing
              > it? Did his pretension fucked him up?
              >
              > i was working on a program where i needed to split a path into dirname,
              > corename, and suffix. But this fucking python doc diverted my work and
              > wasted my time. It normally isn't a problem to find imperfections in
              > the world except the fucking OpenSourcers fuck with their fucking
              > moronicity and moronitude and propagate haughtily their fucking lies
              > and stupidity. Die.
              >
              > Suggested rewrite:
              >
              > split(path)
              > returns a pair (dirname,filena me), where dirname is the part of path
              > up to the last slash, and filename is the rest of the string after the
              > last slash.
              >
              > Exceptional cases are:
              > · if path is a single slash (or repeated), then path == dirname and
              > filename is empty.
              > · If the "last" slash is repeated, they are treated as one single
              > slash.
              >
              > ------------
              > Fuck the motherfucking liers of OpenSourcing fuckheads.
              > (Note: my use of OpenSource here does not include people of GNU
              > community.)
              >
              > For more about Python Doc problems, see
              > http://xahlee.org/Periodic_dosage_di...ami_cukta.html
              >
              > Xah
              > xah@xahlee.org
              > ? http://xahlee.org/
              >[/color]

              Comment

              • Xah Lee

                #8
                Re: Python Doc Problem Example: os.path.split

                Addendum:

                I was working on a program where i needed to split a path into dirname,
                corename, and suffix.

                I came to this page and took me a while to understand what split() is
                about. There are other path related functions splitext(), splitdrive(),
                basename(), dirname(). User has to scan the whole page and read
                painfully each one to fully understand how to choose and use them for
                the task at hand.

                As i have explained before (see references at bottom), documentation
                should be organized oriented towards programer's tasks, not
                alphabetically, compiler view, or computer sciency scheme. On this
                os.path module, split(), splittext(), dirname(), basename() should all
                be under one section. This way, their usefulness and each's fitness
                becomes clearer, and also easier to document as a collective. Other
                functions that test files or get info about files should be together.
                Don't be afraid that there are functions that doesn't fit into some
                “classificati on”. For exapmle, the walk() and
                supports_unicod e_filenames() can be lumped at the bottom as Other. The
                need to present materials in some aloof, computer sciency, academic,
                precision pretensions way is a major usability problem in the Python
                doc.

                (the OpenSourcers's need to present materials that way is a backlash of
                the willful juvenile sloppiness of unix/perl community. However, they
                being the same crowd without significant critical thinking and writing
                skills, cannot do better by hiding in formality.)

                Also, at the top we see:

                Warning: On Windows, many of these functions do not properly
                support UNC pathnames. splitunc() and ismount() do handle them
                correctly.

                As indicated before, this is a exhibition of tech geeking and
                jargonizing. If this warning is necessary, place it at the bottom of
                the page as a footnote. Also, spell out UNC, and provide a link to its
                proper spec.

                Tech geekers are very pretentious of tech matters. They are afraid, as
                if spelling out UNC would make them unprofessional, that their peers
                would deem them inferior. There are a myriad of techincal standards
                that any programer could only be familiar with a fraction, confined to
                his area of expertise. Standards and its acronyms come and go , and
                each with varying degree of precision, actual revelance, and they are
                intermingled with de facto “standards” in the commercial world that
                may not even have official names. The tech geekers are clouded by their
                narrow knowledge. The purpose of documentation is not some cold
                academic presentation. Vast majority who came to use os.path wouldn't
                know what UNC is. Spell things out when in doubt.

                UNC here, isn't really a significant “standard”. This warning
                should be left out.

                -----------
                This post is archived at:


                Xah
                xah@xahlee.org
                ∑ http://xahlee.org/


                Xah Lee wrote:[color=blue]
                > Python Doc Problem Example
                >
                > Quote from:
                > http://docs.python.org/lib/module-os.path.html
                > ----------
                > split( path)
                > Split the pathname path into a pair, (head, tail) where tail is the
                > last pathname component and head is everything leading up to that. The
                > tail part will never contain a slash; if path ends in a slash, tail
                > will be empty. If there is no slash in path, head will be empty. If
                > path is empty, both head and tail are empty. Trailing slashes are
                > stripped from head unless it is the root (one or more slashes only). In
                > nearly all cases, join(head, tail) equals path (the only exception
                > being when there were multiple slashes separating head from tail).
                > ----------
                >
                > Can anyone tell me what this verbiage is trying to fucking say?
                >
                > what the fuck is with the head and tail thing?
                >
                > is the doc writer, trying to write the doc with some austereness, but
                > is confused about the behavior of split, or confused about expressing
                > it? Did his pretension fucked him up?
                >
                > i was working on a program where i needed to split a path into dirname,
                > corename, and suffix. But this fucking python doc diverted my work and
                > wasted my time. It normally isn't a problem to find imperfections in
                > the world except the fucking OpenSourcers fuck with their fucking
                > moronicity and moronitude and propagate haughtily their fucking lies
                > and stupidity. Die.
                >
                > Suggested rewrite:
                >
                > split(path)
                > returns a pair (dirname,filena me), where dirname is the part of path
                > up to the last slash, and filename is the rest of the string after the
                > last slash.
                >
                > Exceptional cases are:
                > • if path is a single slash (or repeated), then path == dirname and
                > filename is empty.
                > • If the “last” slash is repeated, they are treated as one single
                > slash.
                >
                > ------------
                > Fuck the motherfucking liers of OpenSourcing fuckheads.
                > (Note: my use of OpenSource here does not include people of GNU
                > community.)
                >
                > For more about Python Doc problems, see
                > http://xahlee.org/Periodic_dosage_di...ami_cukta.html
                >
                > Xah
                > xah@xahlee.org
                > ∑ http://xahlee.org/[/color]

                Comment

                • Diez B. Roggisch

                  #9
                  Re: Python Doc Problem Example: os.path.split

                  >[color=blue]
                  > split(path)
                  > returns a pair (dirname,filena me), where dirname is the part of path
                  > up to the last slash, and filename is the rest of the string after the
                  > last slash.[/color]

                  Bullshit. Slash isn't always the path component delimiter. Get a clue on
                  what you're talking about before suggesting so-called "improvemen ts".
                  And once and for all get it into your head that it's not the purpose of
                  this nor any other documentation effort to precisely fit your
                  nano-tube-narrow mindset.

                  Diez

                  Comment

                  • Antoon Pardon

                    #10
                    Re: Python Doc Problem Example: os.path.split

                    Op 2005-09-19, Diez B. Roggisch schreef <deets@nospam.w eb.de>:[color=blue][color=green]
                    >>
                    >> split(path)
                    >> returns a pair (dirname,filena me), where dirname is the part of path
                    >> up to the last slash, and filename is the rest of the string after the
                    >> last slash.[/color]
                    >
                    > Bullshit. Slash isn't always the path component delimiter. Get a clue on
                    > what you're talking about before suggesting so-called "improvemen ts".
                    > And once and for all get it into your head that it's not the purpose of
                    > this nor any other documentation effort to precisely fit your
                    > nano-tube-narrow mindset.[/color]

                    I think this is unfair. The use of "slash" is a failing of the current
                    documentation. If his use is an indication of a nano-tube-narrow
                    mindset then so would be the use by the actual documentation writers.

                    --
                    Antoon Pardon

                    Comment

                    • Diez B. Roggisch

                      #11
                      Re: Python Doc Problem Example: os.path.split

                      [color=blue]
                      > I think this is unfair. The use of "slash" is a failing of the current
                      > documentation. If his use is an indication of a nano-tube-narrow
                      > mindset then so would be the use by the actual documentation writers.[/color]


                      You're right - I missed that somehow, as the original docs talk about
                      components - which made me assume that these are independently defined
                      from the slash.

                      But I stand by the nano-tube-narrow mind-set of Xah Lee. Besides his
                      tourette syndrome he also is simply unwilling to read documentation if
                      it is not what _he_ expects it to be.

                      Diez

                      Comment

                      • Peter Hansen

                        #12
                        Re: Python Doc Problem Example: os.path.split

                        Diez B. Roggisch wrote:[color=blue][color=green]
                        >>I think this is unfair. The use of "slash" is a failing of the current
                        >>documentation . If his use is an indication of a nano-tube-narrow
                        >>mindset then so would be the use by the actual documentation writers.[/color]
                        >
                        > You're right - I missed that somehow, as the original docs talk about
                        > components - which made me assume that these are independently defined
                        > from the slash.[/color]

                        That's okay. We hardly lack for examples of his double standard: note
                        his claim that split() returns a (dirname, filename) pair, which is not
                        correct in all cases either, making his suggestion no better than the
                        stuff he criticizes, at best.
                        [color=blue]
                        > But I stand by the nano-tube-narrow mind-set of Xah Lee. Besides his
                        > tourette syndrome he also is simply unwilling to read documentation if
                        > it is not what _he_ expects it to be.[/color]

                        It's interesting to note that c.l.p still manages to give cordial and
                        helpful replies when his posts are not offensive ... in spite of us all
                        repeatedly being labelled "fuckers" and worse.

                        I strongly suspect (and here I manage to get this on-topic, to the shock
                        of all) that he learned English from something written (apparently) by
                        Monty Python, and mistakenly thought this was how most people speak in
                        public (see http://www.sigg3.net/myself/fuck.html for but one copy).

                        -Peter

                        Comment

                        • Steve Holden

                          #13
                          Re: Python Doc Problem Example: os.path.split

                          Peter Hansen wrote:[color=blue]
                          > Diez B. Roggisch wrote:[/color]
                          [...][color=blue][color=green]
                          >>But I stand by the nano-tube-narrow mind-set of Xah Lee. Besides his
                          >>tourette syndrome he also is simply unwilling to read documentation if
                          >>it is not what _he_ expects it to be.[/color]
                          >
                          >
                          > It's interesting to note that c.l.p still manages to give cordial and
                          > helpful replies when his posts are not offensive ... in spite of us all
                          > repeatedly being labelled "fuckers" and worse.
                          >[/color]
                          That's the friendly fuckers on c.l.py for you ...
                          [color=blue]
                          > I strongly suspect (and here I manage to get this on-topic, to the shock
                          > of all) that he learned English from something written (apparently) by
                          > Monty Python, and mistakenly thought this was how most people speak in
                          > public (see http://www.sigg3.net/myself/fuck.html for but one copy).
                          >[/color]
                          While this surmise does bring us close to being on-topic I fear you are
                          being far more charitable than is justified here. But I *am* getting a
                          bit fucking tired of his rather limited style of discourse.

                          regards
                          Steve
                          --
                          Steve Holden +44 150 684 7255 +1 800 494 3119
                          Holden Web LLC www.holdenweb.com
                          PyCon TX 2006 www.pycon.org

                          Comment

                          Working...