"Compile time" checking?

en.karpachov at ospaz.ru en.karpachov at ospaz.ru
Wed Aug 10 14:04:05 EDT 2005


On 10 Aug 2005 08:53:15 -0700
Qopit wrote:

> def tester(a,b,c):
>   print "bogus test function",a,b,c
> tester(1,2,3)  #this runs fine
> tester(1,2)    #this obviously causes a run-time TypeError exception

/tmp% cat >a.py
def tester(a,b,c):
  print "bogus test function",a,b,c
tester(1,2,3)  #this runs fine
tester(1,2)    #this obviously causes a run-time TypeError exception
/tmp% pychecker a.py
Processing a...
bogus test function 1 2 3
  Caught exception importing module a:
    File "/usr/lib/site-python/pychecker/checker.py", line 587, in setupMainCode()
      module = imp.load_module(self.moduleName, file, filename, smt)
    File "a.py", line 4
      tester(1,2)    #this obviously causes a run-time TypeError exception
  TypeError: tester() takes exactly 3 arguments (2 given)

Warnings...

a:1: NOT PROCESSED UNABLE TO IMPORT
/tmp% pychecker -V
0.8.14

-- 
jk



More information about the Python-list mailing list