The Python standard library and PEP8

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Mon Apr 20 09:18:23 CEST 2009

In message <gsg2iv$g5j$1 at>, Aahz wrote:

> What kind of OO language allows you to do this:
> def square(x):
>     return x*x
> for i in range(10):
>     print square(x)

Take out the "OO" qualifier, and the answer is still "none":

    Traceback (most recent call last):
      File "<stdin>", line 2, in <module>
    NameError: name 'x' is not defined

More information about the Python-list mailing list