Idiosyncratic python

Ned Batchelder ned at nedbatchelder.com
Thu Sep 24 22:46:27 CEST 2015


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...

--Ned.


More information about the Python-list mailing list