In theory it could be checked to see if a given function exists in the same namespace as a given variable if it doesn't exist in it that variable's object's method resolution order and try calling it using the syntax described here, but I don't think it affords the language any added elegance or communicative power.

It would have to be determined which takes precedence when a class has a certain method that shares a name with one in the same namespace as an instance. If a method with a given name is not part of a class, the proposed syntax would cause what function calls are valid for a given instance to sometimes be context dependent rather than dependent only on the definition of the class. I'm concerned about what this would mean for language learning and debugging. 

The potential use case seems to be tied to nested function calls that take one argument in the innermost call. If we were to change the syntax to streamline these constructions, I'd want to see composite functions with @ revisited.


On Sun, Jun 28, 2020, 11:00 AM <> wrote:
Is possible some day add Uniform Function Call Syntax (UFCS) in Python like Dlang?

Python-ideas mailing list --
To unsubscribe send an email to
Message archived at
Code of Conduct: