Spot the invalid syntax

MRAB python at mrabarnett.plus.com
Thu Mar 8 19:47:21 EST 2018


On 2018-03-08 23:57, Ben Finney wrote:
> Chris Angelico <rosuav at gmail.com> writes:
> 
>> On Fri, Mar 9, 2018 at 10:33 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
>> > In many cases, those eyes can be virtual and non-human.
>> >
>> > That's what syntax highlighting, and tools even more impressive
>> > (e.g. linting tools that run continually), offer in a programmer's
>> > text editor: a pair of eyes looking for mistakes while you type.
>>
>> Often true, but not always.
> 
> You mean the tool is not always looking for mistakes while you type?
> 
> If you mean that the tool doesn't catch all mistakes: of course not, and
> I didn't imply it would. Are you saying that's a reason against using
> such automated tools? (If not, I don't really understand what objection
> you're making.)
> 
> Certainly it'd be good to always have a *perfect* overseer checking for
> mistakes . Until that happy day, though, let's use the
> tools available to improve our code before even attempting to run it.
> 
"... while one types"? I'm not so sure.

In the past I've used an IDE (not for Python) that, for example, 
underlined any identifiers that hadn't been defined, but found it 
annoying because it was indicating errors that were due to my not having 
finished writing yet!

Type, pause for thought, syntax error... yes, I know it's a syntax error 
at the moment, but I'm not finished!



More information about the Python-list mailing list