Is it allowed to use function results as default arguments ?

fred.haab fred.haab at gmail.com
Wed Jul 30 05:43:55 CEST 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