Stef Mientki <S.**************@mailbox.kun.nltyped
If I call a parameterless function without brackets at the end,
the function is not performed, but ...
If you omit the brackets, you don't actually call the function. Instead
you get a reference to the function object.
Consider this example:
cwd = os.getcwd()
# cwd now contains a string, denoting the current working directory
func = os.getcwd
# func now contains a reference to the function os.getcwd
print func == os.getcwd # prints True
# you can even call it:
cwd_2 = func()
# cwd_2 now also contains a string with the current directory.
print cwd == cwd_2 # prints True, too
--
Freedom is always the freedom of dissenters.
(Rosa Luxemburg)