[SciPy-Dev] PR #196: simplification of optimization wrappers

Denis Laxalde denis at laxalde.org
Thu Apr 19 10:28:09 EDT 2012


josef.pktd at gmail.com wrote:
> I just saw that the options use a mutable keyword, dict.
> Are we running into problems? It might be safer to set it to None
> instead of an empty dict, given that an empty dict doesn't make a more
> informative signature either.

I'm not sure to see the problem but, AFAICT, setting its default value
to None would not prevent an existing options dictionary (or any
mutable object) that would be passed as an argument to be modified. It
seems there might a problem iff the default value is not an empty
dictionary.
At least, {} as a default value ensures that dictionary methods
always work.

-- 
Denis



More information about the SciPy-Dev mailing list