Steven D'Aprano writes:

 > And yet it is indisputable that chained methods are useful even for 
 > methods which modify the object they work on. Look at pandas:

Guido disputed that it was useful *enough*.  My point was advice to
the proponent to get his proposal adopted (despite the fact that I
personall think it's a YAGNI), not a characterization of universal
best practice.

 > > 2.  Is the method chaining syntax preferable to an alternative
 > >     operator?
 > 
 > What do you mean, a different operator? Are you suggesting we should 
 > have two operators for method lookups?

No, I'm suggesting that pipelines could have an alternative syntax
using a different operator.  This probably isn't really feasible since
(unless we actually added syntax) it would require some sort of
contortion or additional boilerplate to handle non-iterator arguments.

 > a. is obviously impossible, since strings already support method 
 > chaining,

The OP wasn't talking about general method chaining, and neither was I.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@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/7LEYEJLRQFVGRXS46TQOIVSYKXO2Y4Z7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to