[docs] confusing statement in python docs

Sandro Tosi sandro.tosi at gmail.com
Thu Feb 24 23:47:49 CET 2011


Hi Tim,
thanks for your email.

On Tue, Feb 22, 2011 at 18:05, Tim Behrsin <tim at behrsin.com> wrote:
> In section 9.3.4 it states that the following snippet:
>
> xf = x.f
> while True:
>        print xf()
>
> will print "hello world" until 'the end of time'.
>
> I find this statement to be rather confusing....

I think you find it confusing since you're not reporting also the
paragraph above the code snippet:

  "In the MyClass example, this will return the string 'hello world'.
However, it is not necessary to call a method right away: x.f is a
method object, and can be stored away and called at a later time. For
example:"

that means.. the code snippet is a continuation of the MyClass example
given above, so just taken outside its context it doesn't make any
sense, but putting it back inside the page (that's actually a
tutorial, so something we can expect to be followed from the first
line to the last one, without too much jumping around) it gains the
needed details.

Regards,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi


More information about the docs mailing list