On Friday, October 14, 2016 at 5:46:14 AM UTC-7, Steve D'Aprano wrote:
> On Fri, 14 Oct 2016 08:04 pm, BartC wrote:
> > On 14/10/2016 01:59, sohcahto...@gmail.com wrote:
> >> On Thursday, October 13, 2016 at 4:06:36 PM UTC-7, pozz wrote:
> >>> Are the things exactly how I understood, or do I miss something in
> >>> Python?
> >> As others have said, user a linter.
> > With Python you're supposed to just be able run any source code
> > instantly; how will using a 'lint' tool impact that process? Or is it
> > only meant to be used infrequently?
> The process is little different between C and Python:
> With C: during development, you run the compiler (which includes built-in
> static analysis) or stand-alone linter, and optionally any tests you have,
> etc. The deployed software rarely if ever includes static analysis.
> With Python: during development, you optionally run linters, static
> analysis, tests, etc. After deployment, you rarely run static tests,
> linting, etc.
> >> I'd go a step further and use an actual code editor or IDE that includes
> >> some basic static analysis. Using this example that Skip used:
> >> def func2(a, b):
> >> print(a, b)
> >> def func1(a):
> >> print(a)
> >> func2(1)
> >> Any code editor worth using will highlight the ) on the last line and
> >> tell you that there's a missing parameter.
> That's a matter of opinion.
Fair enough. vi/vim is a popular editor for writing code, but I personally
can't stand them.
Of course, that's another subject entirely.