"Compile time" checking?
Qopit
russandheather at gmail.com
Wed Aug 10 15:01:01 EDT 2005
> Why not just find out, by trying to compile it? :-)
This will likely certify me as a python newbie, but... how do you mean?
How do you compile a .py file?
If you mean to .pyc by doing an import on it, that may work fine for
the simple example I typed up earlier, but that is easy to bypass by
slapping the offending line in a function. The sample below also
passes PyChecker with not even a warning:
#----
def tester(a,b,c):
print "bogus test function",a,b,c
def try1():
tester(1,2,3)
def try2():
tester(1,2) #still no error here
#----
Do you mean something different?
Also - thanks for the pylint comment... haven't tried it yet. It would
be nice to have the capability in an IDE like SPE, though.
More information about the Python-list
mailing list