Re: "Compile time" checking?

2005-08-13 Thread Benjamin Niemann
t; that finds the errors the compiler would otherwise find. I'm referring, >> of course, to Test Driven Development (TDD). >> >> If you do TDD, you won't miss compile-time checking much. In fact, the >> extra kruft that manifest typing requires is an annoyin

Re: "Compile time" checking?

2005-08-13 Thread Steve Jorgensen
#x27;re using a process >> that finds the errors the compiler would otherwise find. I'm referring, of >> course, to Test Driven Development (TDD). >> >> If you do TDD, you won't miss compile-time checking much. In fact, the extra >> kruft that manifest typi

Re: "Compile time" checking?

2005-08-13 Thread en.karpachov
I'm referring, of > course, to Test Driven Development (TDD). > > If you do TDD, you won't miss compile-time checking much. In fact, the extra > kruft that manifest typing requires is an annoying burden when doing TDD, so > Python is a breath of fresh air in this regard.

Re: "Compile time" checking?

2005-08-12 Thread Steve Jorgensen
TDD, you won't miss compile-time checking much. In fact, the extra kruft that manifest typing requires is an annoying burden when doing TDD, so Python is a breath of fresh air in this regard. On 10 Aug 2005 08:53:15 -0700, "Qopit" <[EMAIL PROTECTED]> wrote: >Hi there, >

Re: "Compile time" checking?

2005-08-12 Thread spe . stani . be
Hi, If you find something like that, please report it to the bug tracker of SPE with an easy example. Also mention that PyChecker is slow, I might have another look at it. Probably I need to update the version, as SPE ships with the 0.8.13 version. I don't think it's possible to get it already in

Re: "Compile time" checking?

2005-08-11 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Qopit wrote: > I'm > a big fan of Python's ability to easily rebind everything in sight, but > this particular usage seems like a strange abuse I wouldn't expect a > code-checker to be able to figure out. I'll just avoid writing > confusing code like that... it's not only

Re: "Compile time" checking?

2005-08-11 Thread phil hunt
On Thu, 11 Aug 2005 02:35:40 GMT, Bengt Richter <[EMAIL PROTECTED]> wrote: >On Wed, 10 Aug 2005 20:39:03 +0100, [EMAIL PROTECTED] (phil hunt) wrote: >[...] >> >>I've not personally had problems with the wrong number of argumnets >>to a function call -- they get caught at run-time and are easy >>e

Re: "Compile time" checking?

2005-08-11 Thread phil hunt
On 10 Aug 2005 18:32:54 -0700, Qopit <[EMAIL PROTECTED]> wrote: > >> if debug: print "v=%s" % (v,) > >Not that important, but I assume the first one was supposed to be: > > if debug: print "v=", s > >right? No, I'm trying to print (v) not (s). -- Email: zen19725 at zen dot co dot uk -- http

Re: "Compile time" checking?

2005-08-11 Thread Fabio Zadrozny
Just as a note... Pylint is integrated within pydev (http://pydev.sf.net) Cheers, Fabio Qopit wrote: >>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

Re: "Compile time" checking?

2005-08-10 Thread Bengt Richter
On Wed, 10 Aug 2005 20:39:03 +0100, [EMAIL PROTECTED] (phil hunt) wrote: [...] > >I've not personally had problems with the wrong number of argumnets >to a function call -- they get caught at run-time and are easy >enough to fix -- but I do sometimes get errors because a varialbe is >the wrong t

Re: "Compile time" checking?

2005-08-10 Thread Grant Edwards
On 2005-08-11, Qopit <[EMAIL PROTECTED]> wrote: > >> if debug: print "v=%s" % (v,) > > Not that important, but I assume the first one was supposed to be: > > if debug: print "v=", s > > right? http://docs.python.org/tut/node9.html#SECTION00910 -- Grant Edwards

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> if debug: print "v=%s" % (v,) Not that important, but I assume the first one was supposed to be: if debug: print "v=", s right? -- http://mail.python.org/mailman/listinfo/python-list

Re: "Compile time" checking?

2005-08-10 Thread phil hunt
On 10 Aug 2005 12:01:01 -0700, Qopit <[EMAIL PROTECTED]> wrote: >> 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? At the command prompt: $ python yourfile.py This compiles it, then ru

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> if __name__ == '__main__': Yep - that does it... should have thought of that. Thanks. This works fine for pychecker with no hangage: #--- if __name__ == "__main__": while 1: x = raw_input("meh:") #--- -- http://mail.python.org/mailman/listinfo/python-list

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> def tester(a, b, c): > global tester > print "bogus test function", a, b, c > def tester(a, b): > print "other test function", a, b > > tester(1, 2, 3) # This runs fine. > tester(1, 2)# This too. Interesting example. In that case, pychecker does spit out a warning

Re: "Compile time" checking?

2005-08-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Qopit wrote: > Now I'm running into another snag when checking some other code I have. > Pychecker gets hung up on raw_input... it actually executes code > rather than just checking it, it seems. For example, the snippet below > hangs pychecker:: > > #--- > while 1: >

Re: "Compile time" checking?

2005-08-10 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Qopit wrote: > Hi there, > > I'm pretty new to Python and am trying to figure out how to get "will > this code compile?"-like code checking. To me this is a pretty basic > language/environment requirement, especially when working with large > projects. It is *much* bette

Re: "Compile time" checking?

2005-08-10 Thread Qopit
How embarassing... thanks, jk. I grabbed a copy of pychecker v0.8.14 directly (not the one in SPE) and it catches it exactly as you showed. Now I wonder why the SPE one doesn't catch it (and why it is sooo comparatively slow)! Now I'm running into another snag when checking some other code I have

Re: "Compile time" checking?

2005-08-10 Thread Qopit
> 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 s

Re: "Compile time" checking?

2005-08-10 Thread en.karpachov
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

Re: "Compile time" checking?

2005-08-10 Thread phil hunt
On 10 Aug 2005 08:53:15 -0700, Qopit <[EMAIL PROTECTED]> wrote: >Hi there, > >I'm pretty new to Python and am trying to figure out how to get "will >this code compile?"-like code checking. Why not just find out, by trying to compile it? :-) -- Email: zen19725 at zen dot co dot uk -- http://m

Re: "Compile time" checking?

2005-08-10 Thread Benjamin Niemann
Qopit wrote: > [snip] > > My questions are: > - Am I missing something with my tester example? > - Are there other code-checking options other than PyChecker? Try pylint -- Benjamin Niemann Email: pink at odahoda dot de WWW: http://www.odahoda.de/ -- http://mail.python.org/mailman/listinfo/pyt

"Compile time" checking?

2005-08-10 Thread Qopit
Hi there, I'm pretty new to Python and am trying to figure out how to get "will this code compile?"-like code checking. To me this is a pretty basic language/environment requirement, especially when working with large projects. It is *much* better to catch errors at "compile-time" rather than at