From: Steve Howell Date: 2010-10-14T11:05:15+09:00 Subject: Re: Why does a lot of code not include parenthesis? On Oct 11, 7:58 pm, "ara.t.howard" wrote: > > the only real argument for requiring parens is so that > >   o.foo  # returns the method foo > > as in javascript.  other arguments are mostly religious. > Python is like Javascript in that regard. $ python >>> def f(n=100): return n * 2 ... >>> f >>> f() 200 >>> x = f >>> x(30) 60 >>> x = f() >>> x 200 $ irb irb(main):001:0> def f(n=100) n * 2 end => nil irb(main):002:0> f => 200 irb(main):003:0> f() => 200 irb(main):004:0> x = method(:f) => # irb(main):005:0> x.call(30) => 60 I work in both Python and Ruby, and I don't have a strong preference for either style; it just requires a different mindset.