[Tutor] What's the difference between calling a method with parenthesis vs. without it?
Steven D'Aprano
steve at pearwood.info
Tue Jun 19 12:18:34 EDT 2018
On Tue, Jun 19, 2018 at 11:52:08AM -0400, C W wrote:
> Thank you all. I'm relatively new to OOP, I think that's where the problem
> is. It's different from C or any C alike language.
Apart from C-like languages like C++, Objective C, C# and others with
objects :-)
Actually in this specific instance, what seems to be tripping you up is
not the *object oriented* flavour of the code, but the *functional
programming* flavour of the code, specifically that functions are values
at all. (Whether they are "objects" or not is not very important.)
https://en.wikipedia.org/wiki/Functional_programming
In this case, it isn't *much* functional programming. It is just the
idea that functions are values, just like strings and lists and floats.
--
Steve
More information about the Tutor
mailing list