- the compiler doesn't know what type `a` will have;
- whether or not it has a `fun` method;
- whether or not there is a global function `fun`;
- and whether it takes an argument matching `a`.
So all of that would have to happen at run time. That means that using
UFCS would make slow code. The interpreter would have to try calling
`a.fun()`, and if that failed with an AttributeError, it would then try
`fun(a)` instead.
--
Steven
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/TGGNWJPMKBYYTENDMGYYV2I5QEBTNJGP/
Code of Conduct: http://python.org/psf/codeofconduct/