Should we document object methods or module functions using obj.method (module.function) or obj.method() (module.function()).
I prefer the former, Rita used the ladder.
| notatin |
arguments |
obj.method
module.function |
as function are object itself (first-class citizens), they can be assigned. They are callable (or callable()!) which describes them. |
obj.method()
module.function() |
Suggests directly that they are callable and distinguishes them from other attributes. |
I have seen both in the official documentation. I just think it will be good to be consistent.
Any opinion or good reference to elaborate the issue?
Should we document object methods or module functions using
obj.method(module.function) orobj.method()(module.function()).I prefer the former, Rita used the ladder.
obj.methodmodule.functioncallable(orcallable()!) which describes them.obj.method()module.function()I have seen both in the official documentation. I just think it will be good to be consistent.
Any opinion or good reference to elaborate the issue?