Is it allowed to use function results as default arguments ?

fred.haab fred.haab at gmail.com
Tue Jul 29 23:43:55 EDT 2008


Well, others have answered the question, but I thought I'd throw in
that it would be more pythonic to do something like:

def Get_Relative_Path(target, base = None):
    if base is None:
        base = os.curdir
    ...




More information about the Python-list mailing list