list of polynomial functions

Josiah Manson slomojo83 at gmail.com
Thu Jun 15 21:05:51 EDT 2006


> I'm curious why the very first attempt to call p(3) doesn't bomb
> out with the NameError that "polys" wasn't defined before it even
> got to the point of attempting to call it.

In the first call, the 0th lambda function is evaluated, and it was
defined as the constant function 1. The functions after that each refer
to the previous polynomial, so they mess up. The first doesn't so it's
fine.

I'm new to this, as evidenced by my original posting, so I may be
missing something.

I hope I helped,
Josiah




More information about the Python-list mailing list