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/2007-February/071087.html below:

[Python-Dev] New syntax for 'dynamic' attribute access

[Python-Dev] New syntax for 'dynamic' attribute access [Python-Dev] New syntax for 'dynamic' attribute accessGuido van Rossum guido at python.org
Wed Feb 14 02:15:07 CET 2007
On 2/13/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> Martin v. Löwis wrote:
>
> > OTOH, you can't write
> >
> >    x + = 2
> >
> > or
> >
> >    a = 2 * * 4
>
> Although oddly enough you *can* write
>
>     a[. . .]
>
> I guess whoever added the ellipsis couldn't be bothered
> defining a new token for it.

But if we ever turn it into a single token (which we just may for
Py3k) don't complain if your code breaks.

> It's something of an arbitrary choice, but to me it just
> seems that the dot and bracket *should* be separare
> tokens, perhaps because I would be thinking of the
> [x] as a special kind of argument to the dot operator,
> rather than there being a funny new operator called ".[".

Yes, that's how I was thinking of it. But it's all moot now.

-- 
--Guido van Rossum (home page: http://www.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