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/110027.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)Guido van Rossum guido at python.org
Thu Mar 24 18:50:51 CET 2011
On Thu, Mar 24, 2011 at 10:37 AM, Jameson Quinn <jameson.quinn at gmail.com> wrote:
> OK, fair enough. People don't like this. So let me back up a step.

> Clearly this is intended for using with things that you get as a dictionary,
> but which really should be namespaces. The top two cases of that are parsed
> json objects and **kw arguments.

If you need this for **kw arguments maybe you're not using them right;
why not name your arguments if you're going to reference them by name?

The JSON use case seems to be driven because this is the way
JavaScript does things -- they don't distinguish between dicts and
objects. I personally think that's a poor language feature: it blurs a
line that should be clear, between data (dict keys) and program
variables (attributes).

-- 
--Guido van Rossum (python.org/~guido)
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