Greg Ewing, 15.11.2012 11:48:
> mar...@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?

This should work as long as this still creates a copy of d at some point:

    d = {...}
    dict(**d)

Stefan


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to