[Python-ideas] add fluent operator to everything

Steven D'Aprano steve at pearwood.info
Thu Feb 21 07:22:04 EST 2019


Correcting myself twice now, that's not a good sign... :-)

On Thu, Feb 21, 2019 at 12:55:00PM +1100, Steven D'Aprano wrote:

> But there's a deeper problem with this entire concept, regardless of 
> syntax, one which to my knowledge nobody has mentioned yet: it simply 
> isn't compatible with the way operators work in Python at the moment. 
> More on this in another post (coming soon).

On further thought, I would like to withdraw that claim.

Actual operators like + - etc of course are implemented using dunder 
methods, but "pseudo-operators" like the dot aren't. If we had such a 
fluent method chain operator, it would be more like dot than ordinary 
operators.



-- 
Steven


More information about the Python-ideas mailing list