Re:The Performance Impact of Using dict() Instead of {} in C...
by codeape on Wednesday November 14, 2012 @08:35AM
(#4783201)
From the article:
I’ve been reviewing lot of code lately for various open
source and internal projects written in Python. As part of
those reviews, I have noticed what I think is a trend
toward using dict() instead of {} to create dictionaries. I
don’t know exactly why this trend has emerged.
My guess for why this trend has emerged: People prefer javascripts object literal syntax where the attribute names are not quoted.
After writing javascript:
var o = { a: 1, b: 2};
... it feels a bit clunky to write Python:
o = { "a": 1, "b": 2}