Calling Function Without Parentheses!

John Machin sjmachin at
Sun Jan 2 21:28:52 EST 2005

Kamilche wrote:
> What a debug nightmare! I just spent HOURS running my script through
> the debugger, sprinkling in log statements, and the like, tracking
> my problem.
> I called a function without the ending parentheses. I sure do WISH
> Python would trap it when I try to do the following:
> MyFunc
> instead of:
> MyFunc()
> aaaaaaaaaaaah.

Aaaaaaaaaaaah indeed. You must be using an extremely old version of
pychecker. The version I have in my Python22 directory gave the same
results as the current one; see below.

[bangs inserted to defeat Google's lstrip()
!def bar():
!   foo
!def foo():
!   alist = []
!   alist.sort


Processing noparens...

Warnings... Statement appears to have no effect Statement appears to have no effect

More information about the Python-list mailing list