PyWart: Poor Documentation Examples

Devin Jeanpierre jeanpierreda at gmail.com
Sun Jan 11 00:25:10 EST 2015


On Sat, Jan 10, 2015 at 6:32 PM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
> At the point you are demonstrating reduce(), if the reader doesn't
> understand or can't guess the meaning of "n = 4", "n+1" or range(), they
> won't understand anything you say.
>
> Teachers need to understand that education is a process of building upon
> that which has come before. If the teacher talks down to the student by
> assuming that the student knows nothing, and tries to go back to first
> principles for every little thing, they will never get anywhere.

Agree wholeheartedly. That said, I do think reduce(operator.mul, [1,
2, 3, 4]) actually _is_ a better example, since it cuts right to the
point.

-- Devin



More information about the Python-list mailing list