30 Sep 2020 30 Sep '20
On 2020-09-30 13:42, David Mertz wrote:
Fluent programming is uncommon in Python, and hence few methods return a call of the same or similar type. Methods on strings are an exception here, but they are unusual (partly because strings are immutable).
This argument is mentioned a lot on here, but I increasingly think it should be reconsidered. Method chaining is a good way to do things. Lots of things. I'm more and more convinced that some of the things Python does without method chaining would be better done with method chaining, rather than just rejecting method chaining because "that's not how Python does it". (This is tangential to the idea under discussion here, though.)
-- Brendan Barnwell "Do not follow where the path may lead. Go, instead, where there is no path, and leave a trail." --author unknown