Getting around immutable default arguments for recursion

dpapathanasiou denis.papathanasiou at gmail.com
Wed Jan 14 23:31:19 CET 2009


> The usual solution is:
>
> def get_prior_versions (item_id, priors=None):
>      if priors is None:
>          priors = []

Thanks!




More information about the Python-list mailing list