Returning none

Alexander Williams thantos at brimstone.mecha
Sat Aug 28 15:45:01 EDT 1999

On Sat, 28 Aug 1999 07:08:05 GMT, C.Laurence Gonsalves
<clgonsal at> wrote:

>I really *would* like to see a stronger distinction between procedures
>and functions though. I really don't think it's right for a Python

Actually, I have a solution to this that requires absolutely no code
changes, merely a perceptual change; to wit:

There are no procedures in Python.  There are only function calls (and

The hinge-point for understanding is that Python defines a /default/
return value for every function which is returned if there is no
explicit return; in the case of Python this value is "None".  Seen
from this perspective, you can complain about the default value for
function returns and at least be conceptually accurate but can no
longer drag a false distinction between function and procedure into
the mix.

For my part, I rather like None being the default function return
value; this lets me /treat/ a function as a procedure invisibly and
get on with things more important than jiggering with syntax, namely,
solving the problem at hand.

Alexander Williams (thantos at
"In the end ... Oblivion Always Wins."

More information about the Python-list mailing list