functions without parentheses

Steve Holden steve at holdenweb.com
Thu Jul 28 10:12:48 EDT 2005


Simon Dahlbacka wrote [about function calls without parenthesis]:
> If you actually want that kind of syntax, then why don't you use Visual
> Basic? ;)
> 
Because Perl is far too tempting to ignore.

The serious answer to the OP's question, however, is that Python refuses 
to guess whether a function reference not followed by a left parenthesis 
is a reference to a function or a reference to the result of calling the 
function. Perl and VB(Script) make more use of context, in ways that 
confuse many users.

Time for someone to try

     import this

regards
  Steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC             http://www.holdenweb.com/




More information about the Python-list mailing list