First of all, Python is not a "he". Python is an "it".
Thank you, I will remember.
Seems very strange that Python checks ordinary blocks like 'if', 'else', 'def' statement and others..We could just have a big amount of tools to check this.
So now you're arguing for Python to stop checking the Syntax of the program for errors? I'm confused.
I am just kidding.
Well, I understood.
Thank you all for your participation.
2015-02-10 23:12 GMT+02:00 Chris Barker email@example.com:
On Tue, Feb 10, 2015 at 11:53 AM, Eduard Bondarenko firstname.lastname@example.org wrote:
Well, Perl also dynamic language, but except the usage of the additional analyser tools he provides 'use warning' directive and many Perl's developers use this feature.
Why you do not want to add such feature in Python ?
I don't think anyone is saying that pre-run-time static analysis isn't useful.
And I'd bet that most of the folks on this list use some or all of the tools mentioned.
So the question is -- should some small subset of such analysis be built-in to the interpreter? -- and I. for one, don't think it should, at least at this point.
Seems very strange that Python checks ordinary blocks like 'if', 'else',
'def' statement and others..We could just have a big amount of tools to check this.
Python checks syntax before it compiles (or while it compiles), because, well, it literally can't compile the code without correct syntax. It doesn't check things like names existing because those names could be created at run time.
If a line of code never runs during testing, then it can only be assumed to be incorrect.
If it does run during tests, then the really quick and easy stuff like mis-typed names will be caught right away. As there is no long compile-link step, there isn't much to be gained by the interpreter catching these things (that may not actually be errors) in the compile step.
Christopher Barker, Ph.D. Oceanographer
Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception