A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2012-November/122720.html below:

[Python-Dev] performance of {} versus dict()

[Python-Dev] performance of {} versus dict() [Python-Dev] performance of {} versus dict()MRAB python at mrabarnett.plus.com
Wed Nov 14 23:51:37 CET 2012
On 2012-11-14 21:40, Greg Ewing wrote:
> Chris Angelico wrote:
>> Perhaps an alternative question: What can be done to make the latter
>> less unpalatable?
>
> * We could introduce a new syntax such as {a = 1, b = 2}.
>
> * If the compiler were allowed to recognise builtins, it could
> turn dict(a = 1, b = 2) into {'a':1, 'b':2} automatically.
>
That would be a transformation of the AST, although it assumes that
'dict' hasn't been rebound.

Should there be the option of a warning if a builtin is rebound? Or the
option of the transformation plus a warning if the builtin is rebound?
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4