Python documentation problem

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

    Python documentation problem

    Python documentation,


    -----------------
    2.3.10.3 Functions

    Function objects are created by function definitions. The only
    operation on a function object is to call it: func(argument-list).

    There are really two flavors of function objects: built-in functions
    and user-defined functions. Both support the same operation (to call
    the function), but the implementation is different, hence the different
    object types.

    See the Python Reference Manual for more information.
    -----------------

    Fuck the python doc wasted my time. Fuck python coders.
    Each time i tried to use python doc and got frustrated because it being
    grossly incompetent, i'll post a message like this, no more frequent
    than once a week. This will go on as long the python community does
    nothing to fix it or that i remain coding in python.
    For reference, see


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

  • Erik Max Francis

    #2
    Re: Python documentation problem

    Xah Lee wrote:
    [color=blue]
    > Fuck the python doc wasted my time. Fuck python coders.[/color]

    Use your words!

    --
    Erik Max Francis && max@alcyone.com && http://www.alcyone.com/max/
    San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
    The mind is not a vessel to be filled but a fire to be kindled.
    -- Plutarch

    Comment

    • Xah Lee

      #3
      Re: Python documentation problem

      i wanted to find out if Python supports eval. e.g.

      somecode='3+4'
      print eval(somecode) # prints 7

      in the 14 hundred pages of python doc, where am i supposed to find this
      info?

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

      Comment

      • Brian van den Broek

        #4
        Re: Python documentation problem

        Xah Lee said unto the world upon 18/06/2005 03:49:[color=blue]
        > Python documentation,
        > http://python.org/doc/2.4.1/lib/typesfunctions.html
        >
        > -----------------
        > 2.3.10.3 Functions
        >
        > Function objects are created by function definitions. The only
        > operation on a function object is to call it: func(argument-list).
        >
        > There are really two flavors of function objects: built-in functions
        > and user-defined functions. Both support the same operation (to call
        > the function), but the implementation is different, hence the different
        > object types.
        >
        > See the Python Reference Manual for more information.
        > -----------------
        >
        > Fuck the python doc wasted my time. Fuck python coders.
        > Each time i tried to use python doc and got frustrated because it being
        > grossly incompetent, i'll post a message like this, no more frequent
        > than once a week. This will go on as long the python community does
        > nothing to fix it or that i remain coding in python.
        > For reference, see
        > http://xahlee.org/perl-python/re-write_notes.html
        >
        > Xah
        > xah@xahlee.org
        > ∑ http://xahlee.org/[/color]

        I'm sure I will regret this in the morning . . . .

        Xah, since the docs are a community effort, you surely can (and have)
        pointed to genuine blemishes in them.

        I am however at a loss to understand just what the perceived problem
        is here. 5 short sentences, one defining a term, 1 stipulating the
        interface, two pointing out and clearing up a potential cause of
        confusion, and a reference. All are clear, and score quite well on the
        content:words measure to boot. (Certainly it is clearer and more
        informative than the words either you or I have here added.) What's
        your complaint? Not enough cursing?

        Best,

        Brian vdB

        Comment

        • Brian van den Broek

          #5
          Re: Python documentation problem

          Xah Lee said unto the world upon 18/06/2005 04:11:[color=blue]
          > i wanted to find out if Python supports eval. e.g.
          >
          > somecode='3+4'
          > print eval(somecode) # prints 7
          >
          > in the 14 hundred pages of python doc, where am i supposed to find this
          > info?
          >
          > Xah
          > xah@xahlee.org
          > ∑ http://xahlee.org/
          >[/color]

          <http://www.python.org/doc/current/lib/built-in-funcs.html#l2h-23>
          which I got to from
          <http://starship.python .net/crew/theller/pyhelp.cgi?keyw ord=eval&versio n=current>
          in less time that in took to type this.

          Best,

          Brian vdB

          Comment

          • John Machin

            #6
            Re: Python documentation problem

            Xah Lee wrote:[color=blue]
            > i wanted to find out if Python supports eval. e.g.
            >
            > somecode='3+4'
            > print eval(somecode) # prints 7
            >
            > in the 14 hundred pages of python doc, where am i supposed to find this
            > info?
            >[/color]

            Option 1: As they say in the classics, "Suck it and see".
            If you want to find out if something is supported, just type it in:
            [color=blue][color=green][color=darkred]
            >>> somecode = '3+4'
            >>> eval(somecode)[/color][/color][/color]
            7[color=blue][color=green][color=darkred]
            >>>[/color][/color][/color]

            Option 2: Use help():
            [color=blue][color=green][color=darkred]
            >>> help(eval)[/color][/color][/color]
            Help on built-in function eval in module __builtin__:

            eval(...)
            eval(source[, globals[, locals]]) -> value

            Evaluate the source in the context of globals and locals.
            The source may be a string representing a Python expression
            or a code object as returned by compile().
            The globals must be a dictionary and locals can be any mappping,
            defaulting to the current globals and locals.
            If only globals is given, locals defaults to it.

            Option 3: If you have Windows, it's easy to find, just click on the
            Python documentation icon, then select the index tab, and type in "eval"
            (or whatever).

            Option 4: On the Python website, click on the docs link, then choose
            library reference manual, then either go to the built-in functions, or
            go to the index and select "eval" -- this latter method will take you to
            this link:



            HTH,
            John

            Comment

            • Xah Lee

              #7
              Re: Python documentation problem

              Apparently i tried it before posting
              eval '3'
              and got misleading errors because i forgot the parenthesis...

              This is a easy one to find in the doc...
              The unhelpful doc organization and past experiences confounded this
              case.

              Thanks.

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

              Comment

              • Tassilo v. Parseval

                #8
                Re: Python documentation problem

                Also sprach Xah Lee:
                [color=blue]
                > i wanted to find out if Python supports eval. e.g.
                >
                > somecode='3+4'
                > print eval(somecode) # prints 7
                >
                > in the 14 hundred pages of python doc, where am i supposed to find this
                > info?[/color]

                You are not going to find it in comp.lang.perl. misc.

                Tassilo
                --
                use bigint;
                $n=714233503437 702801613970263 303373711390544 118542200534375 65440;
                $m=-8,;;$_=$n&(0xff )<<$m,,$_>>=$m, ,print+chr,,whi le(($m+=8)<=200 );

                Comment

                • Xah Lee

                  #9
                  Re: Python documentation problem

                  > what is wrong with python doc[color=blue]
                  > http://python.org/doc/2.4.1/lib/typesfunctions.html[/color]

                  the problem is that the page essentially says nothing. Nothing that is
                  relevant to programing, and such nothingness occupies a significant
                  portion of the python doc. (at least a quarter) It is like reading a
                  manual to operate a machinery, and in every other paragraph it offers
                  the (technically-fantastically-correct) explanations of what bolt or
                  material were used where.

                  the cause of such nothingness situation is because the brainlessness
                  approach to doc organization coupled with standard computer industry
                  geeking moron's need to computer-sciency speak with implementation
                  infatuation. And in part it came to that really because they are
                  comparative morons.

                  for a more sincere, detailed account, please see:


                  Thanks.

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

                  Comment

                  • Kalle Anke

                    #10
                    Re: Python documentation problem

                    On Sat, 18 Jun 2005 11:49:38 +0200, Xah Lee wrote
                    (in article <1119088178.088 667.227150@g44g 2000cwa.googleg roups.com>):
                    [color=blue]
                    > the problem is that the page essentially says nothing. Nothing that is
                    > relevant to programing, and such nothingness occupies a significant
                    > portion of the python doc. (at least a quarter) It is like reading a
                    > manual to operate a machinery, and in every other paragraph it offers
                    > the (technically-fantastically-correct) explanations of what bolt or
                    > material were used where.[/color]

                    I'm new to Python and the information that's in the docs (at least that
                    example) was what I was looking for. I read this as the referece manual, not
                    a cookbook or a tutorial which clearly requires another style of
                    documentation.

                    Comment

                    • Steven D'Aprano

                      #11
                      Re: Python documentation problem

                      On Sat, 18 Jun 2005 12:02:07 +0200, Kalle Anke wrote:
                      [color=blue]
                      > On Sat, 18 Jun 2005 11:49:38 +0200, Xah Lee wrote
                      > (in article <1119088178.088 667.227150@g44g 2000cwa.googleg roups.com>):
                      >[color=green]
                      >> the problem is that the page essentially says nothing. Nothing that is
                      >> relevant to programing, and such nothingness occupies a significant
                      >> portion of the python doc. (at least a quarter) It is like reading a
                      >> manual to operate a machinery, and in every other paragraph it offers
                      >> the (technically-fantastically-correct) explanations of what bolt or
                      >> material were used where.[/color]
                      >
                      > I'm new to Python and the information that's in the docs (at least that
                      > example) was what I was looking for. I read this as the referece manual, not
                      > a cookbook or a tutorial which clearly requires another style of
                      > documentation.[/color]

                      At the risk of making an ad hominem attack, Xah Lee's posts usually have
                      all the characteristics of Internet trolling. He unnecessarily cross-posts
                      to multiple newsgroups. He makes sweeping generalizations and inflammatory
                      criticisms based on little understanding. He frequently uses abusive
                      language. He tries to critique Python as an expert, and yet frequently
                      makes silly newbie mistakes or displays ignorance of some very basic
                      Python features.


                      Trolls: what they are, how to recognise them, and how to deal with them.



                      --
                      Steven.


                      Comment

                      • Grant Edwards

                        #12
                        Re: Python documentation problem

                        On 2005-06-18, Xah Lee <xah@xahlee.org > wrote:

                        [...]
                        [color=blue]
                        > Fuck the python doc wasted my time. Fuck python coders. Each
                        > time i tried to use python doc and got frustrated because it
                        > being grossly incompetent, i'll post a message like this, no
                        > more frequent than once a week. This will go on as long the
                        > python community does nothing to fix it or that i remain
                        > coding in python.[/color]

                        I guess it's kind of him to warn everybody who hasn't already
                        plonked him...

                        --
                        Grant Edwards grante Yow! I'm wet! I'm wild!
                        at
                        visi.com

                        Comment

                        • Jürgen Exner

                          #13
                          Re: Python documentation problem

                          Xah Lee wrote:[color=blue]
                          > Python documentation,
                          > [...] Python Reference Manual for more information.
                          > [...] python doc wasted my time. [...] python coders.
                          > [...] use python doc
                          > python community [...] coding in python.[/color]

                          [Sexual explicatives deleted]

                          And this outburst has exactly _what_ to do with Perl (see list of NGs)?

                          jue


                          Comment

                          • Jürgen Exner

                            #14
                            Re: Python documentation problem

                            Xah Lee wrote:[color=blue]
                            > i wanted to find out if Python supports eval. e.g.
                            >
                            > somecode='3+4'
                            > print eval(somecode) # prints 7
                            >
                            > in the 14 hundred pages of python doc, where am i supposed to find
                            > this info?[/color]

                            Why are you asking in a Perl NG for information about Python?
                            Or are you also asking your backer how to trim a steak?

                            jue


                            Comment

                            • axel@white-eagle.invalid.uk

                              #15
                              Re: Python documentation problem

                              In comp.lang.perl. misc Xah Lee <xah@xahlee.org > wrote:[color=blue]
                              > i wanted to find out if Python supports eval. e.g.[/color]
                              [color=blue]
                              > somecode='3+4'
                              > print eval(somecode) # prints 7[/color]
                              [color=blue]
                              > in the 14 hundred pages of python doc, where am i supposed to find this
                              > info?[/color]

                              By using the index - it's an alphabetical list of names and topics.

                              Follow-ups set.

                              Axel


                              Comment

                              Working...