On Fri, 25 Sep 2015 06:46 am, Ned Batchelder wrote: > On Thursday, September 24, 2015 at 2:02:38 AM UTC-4, Steven D'Aprano > wrote: >> What are your favorite not-wrong-just-weird Python moments? > > I've seen this a number of times: > > dict_of_values.update({'key': some_value}) > > why not: > > dict_of_values['key'] = some_value > > I've considered writing a Pylint plugin to flag these...
Awesome! I haven't seen it in the wild, but there's this too: dict_of_values.update(key=some_value) -- Steven -- https://mail.python.org/mailman/listinfo/python-list