On Jul 30, 12:04 am, alex23 <wuwe...@gmail.com> wrote:
> On Jul 30, 1:06 pm, r <rt8...@gmail.com> wrote:
>
> > 1.) No need to use "()" to call a function with no arguments.
> > Python --> "obj.m2().m3()" --ugly
> >   Ruby --> "obj.m1.m2.m3"  -- sweeet!
> > Man, i must admit i really like this, and your code will look so much
> > cleaner.
>
> How do you distinguish between calling a method with no arguments, and
> getting access to the method object itself (because it _is_ an object,
> y'know, it's OO all the way down...)?

I agree with alex here. Will take the explicit syntax over the extra
cognitive load of figuring out exactly what's going on with
`obj.m1.m2.m3`.

Python has its warts, but requiring ()'s on function calls isn't one
of them. :)
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to