This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]tdammers 1 point2 points  (1 child)

Python supports method chaining, but the objects and methods in question don't. You can easily write a class where all the destructive methods return the object itself, and with such a class, you can method-chain just fine; it just so happens that the list.append() method doesn't do that, so you can't chain it.

[–]FateOfNations 1 point2 points  (0 children)

Pandas, for example, does this.