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/122690.html below:

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

[Python-Dev] performance of {} versus dict()Mark Adam dreamingforward at gmail.com
Wed Nov 14 17:12:54 CET 2012
On Wed, Nov 14, 2012 at 3:12 AM, Chris Withers <chris at simplistix.co.uk> wrote:
> Hi All,
>
> A colleague pointed me at Doug's excellent article here:
> ...which made me a little sad, I suspect I'm not the only one who finds:
>
> a_dict = dict(
>     x = 1,
>     y = 2,
>     z = 3,
>     ...
>     )
>
> ...easier to read than:
>
> a_dict = {
>     'x':1,
>     'y':2,
>     'z':3,
>     ...
>     }

Hey, it makes me a little sad that dict breaks convention by allowing
the use of unquoted characters (which everywhere else looks like
variable names) just for a silly typing optimization.

mark
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