Uniform Function Call Syntax (UFCS)

jongiddy jongiddy at gmail.com
Tue Jun 10 02:43:55 EDT 2014


So, just to summarise the discussion:

There was some very mild support for readable pipelines, either using UFCS or an alternative syntax, but the Pythonic way to make combinations of function and method applications readable is to assign to variables over multiple lines.  Make the code read down, not across.

The idea that a class method could override a function using UFCS didn't get much traction. From Zen of Python, "explicit is better than implicit" means no differences in behaviour, depending on context. The fact that x.y and x.__getattr__ may behave differently under UFCS is also a problem. Since hasattr testing and AttributeError catching are both commonly used now, this could cause real problems, so could probably not be changed until Python 4.

Finally, Gilbert & Sullivan are definitely due a revival.



More information about the Python-list mailing list