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/2011-March/110037.html below:

[Python-Dev] Dict access with double-dot (syntactic sugar)

[Python-Dev] Dict access with double-dot (syntactic sugar) [Python-Dev] Dict access with double-dot (syntactic sugar)skip at pobox.com skip at pobox.com
Thu Mar 24 21:50:28 CET 2011
    Greg> Either you have a mostly-fixed set of field names, in which case
    Greg> you should be using a custom class instead of a dict, or the set
    Greg> of keys is dynamic, in which case you're mostly indexing with
    Greg> computed values. Lots of somedict['foo'] appearing is a code
    Greg> smell.

Unless, as I suspect, given the first message in the thread, the dict is
arriving via JSON.  Doesn't that only support the most basic builtin scalar
and container types?  You couldn't transfer class instances over JSON could
you?  As with XML-RPC I suspect your best fallback is a dictionary.

Skip
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