April 19, 2012
2:28 p.m.
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