Are routine objects guaranteed mutable & with dictionary?

sturlamolden sturlamolden at yahoo.no
Sat Dec 5 19:15:13 EST 2009


On 5 Des, 12:55, Andreas Waldenburger <use... at geekmail.INVALID> wrote:

> Can you please elaborate? To me, a function is something that
> transforms some input to some output [1]. Which is exactly what Python
> functions do, without fail.

A mathematical function cannot have side effects. That is what
functional languages strive for. However, without allowing side-
effects, how can you control hardware (printer, file i/o, etc.)?

A Python callable is never a computer science "routine", as it always
returns a value. If no value is explicitely returned, it will silently
return None. All Python callables are functions.

Also in C, calling a void function "routine" is dubious. Fortran and
Basic have a destinction between functions and routines, however.

























More information about the Python-list mailing list