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

Denis Laxalde denis@laxalde....
Thu Apr 19 09:28:09 CDT 2012


josef.pktd@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