Eric Anderson schrieb:
> Seems like unnecessary code but obviously I know nothing about Python.

Correct, the truth example isn't a good example. "if argv" is better.
But you can write interesting things with the operator module. For example

>>> import operator
>>> def fac(x):
...     return reduce(operator.mul, range(1, x+1))
...
>>> fac(2)
2
>>> fac(3)
6
>>> fac(4)
24

In general one doesn't use the operator module.

Christian

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to