Closed ArtemIsmagilov closed 3 months ago
I can, of course, strictly rewrite. At your discretion
if arg is None:
arg = {}
I think it's fine.
In most cases the dicts and lists passed as parameters are supposed to be read-only, then having {}
or []
as default value isn't harmful. At the other hand, there is no way to enforce or even indicate that objects passed as parameters shouldn't be modified by a method. Passing None
is definitively best practice, and the param or {}
-style is compact and easily understandable.
this PR copy resolver problem #408