[docs] doc bug

Sandro Tosi sandro.tosi at gmail.com
Sun Sep 18 23:59:06 CEST 2011


Hello Michael

On Thu, Sep 8, 2011 at 12:17, Michael McLeod <mmcleod at pc-1.co.uk> wrote:
> Where: Programming FAQ: Is it possible to write obfuscated one-liners in
> Python?
...
>
>
> Both use reduce but they now show:
> NameError: global name 'reduce' is not defined
>
> Fix:
>
> Now  functools  need to be imported.
>
> So now the above should be 2 liners or can you get the import in there?

Could you please tell me where did you find the page your referring
to? I have checked the documentation on docs.python.org and there's
this line

    from functools import reduce

right at the beginning of the example.

Cheers,
-- 
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