inveniosoftware / datacite

Python API wrapper for the DataCite API.
https://datacite.readthedocs.io
Other
27 stars 33 forks source link

Remove usages of mutable default arguments #40

Closed sloria closed 6 years ago

sloria commented 6 years ago

Default arguments are evaluated once, when methods are defined. Multiple calls to the same method could therefore use the same dictionary, which could lead to hard-to-trace bugs.

http://docs.python-guide.org/en/latest/writing/gotchas/#mutable-default-arguments

lnielsen commented 6 years ago

Thanks @sloria! I need to add a copyright line in the changed files - would that be you personally or Center for Open Science?

Do you need a fast release of the changes?

sloria commented 6 years ago

@lnielsen These changes should go under Center for Open Science.

No rush on the release of these changes.

sloria commented 6 years ago

Thanks for the fixups when you merged. I'll make sure to update the Copyright statements myself next time I contribute.

lnielsen commented 6 years ago

No worries, it's not an issue at all.