[Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)
Greg Ewing
greg.ewing at canterbury.ac.nz
Thu Nov 15 11:48:27 CET 2012
martin at v.loewis.de wrote:
> It's faster than calling dict() because the dict code will
> create a second dictionary, and discard the keywords dictionary.
Perhaps in the case where dict() is called with keyword
args only, it could just return the passed-in keyword
dictionary instead of creating another one?
--
Greg
More information about the Python-Dev
mailing list