Oh right, sorry for useless notification. Thanks a lot for answering though, I was reading fast to adapt my knowledge from other languages and indeed completely missed the point. On 12 November 2015 at 15:22, Zachary Ware <zachary.ware+pydocs@gmail.com> wrote:
Hi Matthieu,
Hello,
Quick email to notice about a typo error on the following documentation
On Wed, Nov 11, 2015 at 11:58 PM, Matthieu de La Roche Saint-André <matthieudelaro@gmail.com> wrote: page
: https://docs.python.org/3.5/tutorial/classes.html#method-objects
On the last line of the example, a dot is missing between x and f
Actually, it's not; that's the point of the example :). Note that the first line of the last example is "xf = x.f", which assigns the method object to the name "xf", which is then used (called) in the last line. Try it out using the MyClass class from further up the page.
The page could perhaps use an update to make that more obvious (and the example less obnoxious to run), such as:
method = x.f for each in range(5): print(method())
...but what's there now is not wrong.
Thanks for the report, though!
Regards, -- Zach