Ruby parens-free function calls [was Re: Accessing parent objects]

Gregory Ewing greg.ewing at canterbury.ac.nz
Tue Mar 27 17:46:49 EDT 2018


Rick Johnson wrote:
>     rb> Object.method("print_name").call("Meathead")

Yes, but the point is that you have to have to use a different
syntax to call it. This is like having to say

    f.__call__(arg)

in Python instead of just

    f(arg)

-- 
Greg



More information about the Python-list mailing list