Making every no-arg method a property?
Ben Finney
ben+python at benfinney.id.au
Tue Aug 5 19:49:06 EDT 2014
Christian Calderon <calderon.christian760 at gmail.com> writes:
> I like that in ruby I don't have to type parenthesis at the end of
> each function call if I don't need to provide extra arguments.
Whereas I like the opposite: there is a clear syntactic distinction
between “get the value of ‘foo.bar.baz’” versus “get the value returned
when calling ‘foo.bar.baz’”.
Having the same name sometimes refer to “get this as a value” and other
times “call this as a function and get the return value” imposes a
cognitive load on the reader, IMO an unnecessary one.
--
\ “If this is your first visit to the USSR, you are welcome to |
`\ it.” —hotel room, Moscow |
_o__) |
Ben Finney
More information about the Python-list
mailing list