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/071078.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 accessGreg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 14 01:29:06 CET 2007
Martin v. Löwis wrote:

> BTW, which of these would be correct

My thoughts would be

    (a).[b]           Okay
    (a.)[b]           Not okay
    a.[(b)]           Okay
    a.([b])           Not okay
    a   .  [  b  ]    Okay

> and what is the semantics of
> 
>   a.[42]

The same as getattr(a, 42), which depends on a's __getattr__
implementation.

--
Greg
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