question od default args

Gonçalo Rodrigues op73418 at mail.telepac.pt
Wed Jun 26 13:45:25 EDT 2002


Hi,

When I want default args I usually do

def (arg = None):
    ...

But what if I want to make None a reasonable argument too? That is, I
want to know if the user has in fact passed an argument, and if not to
do something special, with None (or whatever object) being a reasonable
arg to be passed.

All the best,
Gonçalo Rodrigues



More information about the Python-list mailing list