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/071034.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 accessGiovanni Bajo rasky at develer.com
Tue Feb 13 11:52:42 CET 2007
On 13/02/2007 5.33, Maric Michaud wrote:

> I really dislikes the .[ or .( or .{ operators.
> Just on my mail editor the two expressions
> 
> a.[b]
> 
> and
> 
> a,[b]
> 
> are quite hard to differentiate while completely unrelated.

I'll propose a new color for this bikeshed:

a.[[b]]

  handlers = chain.get(kind, ())
  for handler in handlers:
      func = handler.[[meth_name]]
      result = func(*args)
      if result is not None:
          return result

Little heavy on the eye, but it seems that it's exactly what people want and 
can't find in the .[] syntax.
-- 
Giovanni Bajo

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