3 ms·
• it's a method on an object, which makes my brain happy. I never managed to get my brain wrapped around the old style syntax, it's inconsistent with the rest o
by _ZeD_ 12y ago
• it's a method on an object, which makes my brain happy. I never managed to get my brain wrapped around the old style syntax, it's inconsistent with the rest of the python syntax.
uhh... so you'd prefer to do something like `1.add(2)` ???
- jnpatel 12y agoWhile arithmetic syntactic sugar is useful since it's much clearer, I agree that I'd often prefer a function call to some unintuitive symbol syntax. Another example for me, in Python, is: print >> sys.stderr, 'foo' vs. print ('foo', file=sys.stderr)
- dorfsmay 12y agoAh yes, I've been doing from __future__ import print_function pretty much since it has been available. flush=True, end='' etc.... much more intuitive.
- dorfsmay 12y agoI'd be happy with `int().add(1, 2)`, it'd be more consistent. If we carry on this discussion lispers are going to tell us we're the ones with the funny syntax!