Forgetting "()" when calling methods
Klaus Meyer
km-news1 at onlinehome.de
Sat Apr 26 11:57:07 EDT 2003
> I don't know what to DO about it, but some minor tweaks might help.
I also have made this mistake sometimes.
On reason, i think, is the mix of function-call and values, example:
import time
print time.time()
print time.timezone
You have to remember the doc of the module carefully to make no mistake.
In this case time() must be a function, because it has to read the actual
timer value, but must timezone be a value?
My question about style:
Should a Module/Class etc. return values, if possible, or better use
function to return values?
If PyChecker could check such cases this would be very helpful.
--
Gruß - regards Klaus :-)
More information about the Python-list
mailing list