6 ms·
>In those examples you start with an object, call a method on the object returning a new object, then call a method on that and so on. I like this kind of chain
by vram22 4y ago
>In those examples you start with an object, call a method on the object returning a new object, then call a method on that and so on. I like this kind of chaining in OOP.
Then this post from my blog might be of interest:
Examples of method chaining in Python:
https://jugad2.blogspot.com/2016/02/examples-of-method-chaining-in-python.html https://jugad2.blogspot.com/2016/02/examples-of-method-chain...
- jemmyw 4y agoNot really, I already know what it is and use it all the time. I mean, I just wrote about it. Plus I don't program in python. Honestly, I just opened your page and it's not a great example. Consider the method chaining in the linked article that operates on an array, it's much closer to real problems imo, and more succinct.
- vram22 4y agoWhich linked article?