Python vs. Ruby

Brian Quinlan brian at sweetapp.com
Tue Dec 31 19:37:57 EST 2002


John Roth wrote:
> It also has a solution to one of the ugliest warts in Python:
> the fact that the .append(), .sort() and .reverse() methods
> don't return an updated value, so you can't chain them.

This is by design in Python. It would be trivial to change these methods
to return self if it were considered desirable.

Cheers,
Brian






More information about the Python-list mailing list