[Python-ideas] Dart-like method cascading operator in Python

Chris Angelico rosuav at gmail.com
Fri Nov 22 06:43:18 CET 2013


On Fri, Nov 22, 2013 at 3:44 PM, Haoyi Li <haoyi.sg at gmail.com> wrote:
> - You should name all your variables because naming them short isn't harder
> than not-naming them

Converse to this: Sometimes it's a LOT clearer to show that you're
working twice with the same object than to show exactly what object
you're working with each time. Consider it a case of DRY. Chaining
methods shows that you're doing three things to one object; naming the
object each time separates them. Both have their uses.

ChrisA


More information about the Python-ideas mailing list