Re: functions without parentheses



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/

.



Relevant Pages

  • Re: Pass object to another form?
    ... Objects in VB are always passed by reference. ... > Sample code is below and contains ALL the code in my test app. ... there is no need for parenthesis. ...
    (microsoft.public.vb.general.discussion)
  • Re: Huge problem and no idea...
    ... if you want a parenthesis around an equation number you should use ... the command \eqref from amsmath. ... The problem here is that the reference number is 2.1 and is inserted ...
    (comp.text.tex)
  • Re: how can I combine the parenthesis of a reference and a link to a section?
    ... avilella wrote: ... I would like to combine the parenthesis created by a bibliographic ... reference with a reference to a section like this: ... LaTeX FAQ: http://www.tex.ac.uk/faq ...
    (comp.text.tex)
  • Re: Getting Month and Day working in BibTex @electronic entry in IEEEtran
    ... The journal I use as a reference, IEEE/ACM Transactions on Networking, ... has never used a period after the date which in enclosed in parenthesis. ... I'll have to look at more examples to make sure that their new format ...
    (comp.text.tex)
  • Re: refcounting
    ... > Simon Dahlbacka wrote: ... > so the reference is guaranteed to stay while you hold on to the argument ... Somehow I had managed to miss the common structs page (and especially ...
    (comp.lang.python)