function without brackets ?

rzed rzantow at gmail.com
Wed Jan 3 09:46:49 EST 2007


Stef Mientki <S.Mientki-nospam at mailbox.kun.nl> wrote in news:57668
$459bbf95$d443bb3a$16218 at news.speedlinq.nl:

> If I call a parameterless function without brackets at the end,
> the function is not performed, but ...
> I don't get an error message ???
> 
> Is this normal  behavior ?
> 

Yes, it's normal, but you did not in fact call the function, if you 
were using Python. Functions are objects that, for example, can be 
passed to other functions. The way to refer to the functions 
themselves is to omit the arguments and parentheses. So by simply 
stating the name of a function, that's all you've done. 

-- 
rzed



More information about the Python-list mailing list