P1sec / pycrate

A Python library to ease the development of encoders and decoders for various protocols and file formats; contains ASN.1 and CSN.1 compilers.
GNU Lesser General Public License v2.1
381 stars 132 forks source link

Change [] default arguments to None #208

Closed mbrehler closed 2 years ago

mbrehler commented 2 years ago

Mutable default arguments lead to problems, cf https://florimond.dev/en/posts/2018/08/python-mutable-defaults-are-the-source-of-all-evil/ We ran into this calling get_val_jer_paths multiples times in a loop.

Change-Id: Ic6d6d478beaf54b92f4026e27f7b6d850a9cca15

p1-bmu commented 2 years ago

You're correct. Thanks for the PR.