Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

6 May, 2024: The networking issue during the past two days has been identified and appears to be fixed. Will keep monitoring.


devel / comp.lang.python / Re: What to use for finding as many syntax errors as possible.

SubjectAuthor
o Re: What to use for finding as many syntax errors as possible.Avi Gross

1
Re: What to use for finding as many syntax errors as possible.

<mailman.578.1665343114.20444.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=19716&group=comp.lang.python#19716

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: avi.e.gr...@gmail.com (Avi Gross)
Newsgroups: comp.lang.python
Subject: Re: What to use for finding as many syntax errors as possible.
Date: Sun, 9 Oct 2022 15:18:19 -0400
Lines: 55
Message-ID: <mailman.578.1665343114.20444.python-list@python.org>
References: <a95001e1-b60e-63ce-d363-30481d115282@vub.be>
<CABaFrRayYinb9Cd1w=iAz1NWmt6MOzam1yEYXPaAMjREriVUAg@mail.gmail.com>
<00893b0c-e367-6fc9-cdae-f0ee42bc16c0@vub.be>
<CABaFrRaaXAz6ZygQNpp2LTNgVMh+hv55RoBv+ZS7E8s4ki83+w@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Trace: news.uni-berlin.de 9Qkqs22AZ+K2XmJmqsNTxAGf/J83MRUc2GvvrxjXoE8Q==
Return-Path: <avi.e.gross@gmail.com>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=pass
reason="2048-bit key; unprotected key"
header.d=gmail.com header.i=@gmail.com header.b=bpmk+7GP;
dkim-adsp=pass; dkim-atps=neutral
X-Spam-Status: OK 0.011
X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'away.': 0.05; 'issue.':
0.05; 'variable': 0.05; 'cards': 0.07; 'modules': 0.07; 'sun,':
0.07; 'cc:addr:python-list': 0.09; 'compiler': 0.09; 'types.':
0.09; '&gt;': 0.14; 'url:mailman': 0.15; 'syntax': 0.15; '2022,':
0.16; 'antoon': 0.16; 'avi': 0.16; 'backslash': 0.16;
'cc:name:python list': 0.16; 'cleanly': 0.16; 'declare': 0.16;
'effects.': 0.16; 'evaluated': 0.16; 'indentation': 0.16;
'interpreter': 0.16; 'pardon': 0.16; 'schreef': 0.16;
'subject:syntax': 0.16; 'writes': 0.16; 'wrote:': 0.16; 'python':
0.16; 'uses': 0.19; 'cc:addr:python.org': 0.20; 'all,': 0.20;
'issue': 0.21; 'language': 0.21; 'languages': 0.22; 'first,':
0.22; 'code': 0.23; 'run': 0.23; 'anything': 0.25; 'url-
ip:188.166.95.178/32': 0.25; 'url-ip:188.166.95/24': 0.25;
'url:listinfo': 0.25; 'cc:2**0': 0.25; 'url-ip:188.166/16': 0.25;
'error': 0.29; 'putting': 0.31; 'url-ip:188/8': 0.31; 'program':
0.31; 'guess': 0.32; 'language.': 0.32; 'message-
id:@mail.gmail.com': 0.32; 'but': 0.32; 'subject:for': 0.33;
'there': 0.33; '100': 0.33; 'mean': 0.34; 'header:In-Reply-To:1':
0.34; 'received:google.com': 0.34; 'from:addr:gmail.com': 0.35;
'files': 0.36; 'fix': 0.36; 'built': 0.36; 'errors': 0.36;
'change': 0.36; 'really': 0.37; 'using': 0.37; 'received:209.85':
0.37; 'others': 0.37; 'file': 0.38; 'could': 0.38; 'received:209':
0.39; 'text': 0.39; 'enough': 0.39; 'finding': 0.39; 'place.':
0.40; 'subject:What': 0.40; 'something': 0.40; 'want': 0.40;
'try': 0.40; 'to:none': 0.60; 'once': 0.63; 'recovery': 0.64;
'your': 0.64; 'tool': 0.65; 'less': 0.65; 'let': 0.66; 'day':
0.66; 'choose': 0.67; 'assembly': 0.69; 'relate': 0.69; 'late':
0.73; 'moment': 0.81; 'strategy': 0.84; 'catch': 0.84;
'experiment': 0.84; 'handed': 0.84; 'interpreters': 0.84;
'merely': 0.84; 'punch': 0.84; 'spelling': 0.84; 'statement.':
0.84; 'subject:many': 0.84; 'waited': 0.84; 'weird': 0.84;
'errors,': 0.91; 'stable': 0.93
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
h=cc:subject:message-id:date:from:in-reply-to:references:mime-version
:from:to:cc:subject:date:message-id:reply-to;
bh=ps9xIWWJye974H6cwTWCn9jyCUWhLIIfDE2dbm6O+eE=;
b=bpmk+7GPWjoKHilRjGdDmKKWbTJY2WHN7ZDfSFLzHmD6lroaL9k5K7l8eImKY79tel
b2NlaIDqaruxMKUkumfPzLE0nO2939cBvvj+CprecD9+19gwUpeyJ8MWp6VRheLItIOT
rJZLT5JTFx6yrZ7oAEJ+XsxDnjNi+WCWeSg4HoGnqnyu/lLw+StuKq3qMQ/dQgD+YvWr
7cB2y+CCGvx70zc1qk3aYxsSO7c3bxeDawKFTDWWY7RmPo0jy6CrWg0TVGp8XnuwxaST
fAU+LUIXUeFMYjpnZMuTXD9oAywx/Hqc9cFHCOwCW3hZFrQbexCldk7ckgM5hNsgTzvv
ZTgw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=cc:subject:message-id:date:from:in-reply-to:references:mime-version
:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
bh=ps9xIWWJye974H6cwTWCn9jyCUWhLIIfDE2dbm6O+eE=;
b=QsjbgqW4tDPeWNFt1xSMjxIB3d8yT366lNZCIBYERkRv0v4kgL04Zp+StXUFl9EY2z
hH5RsItjc7n8zwNWoD1kc/1G0qvlkq3cOJ/Pmpg/otFQX1IltcRxpr4Gtsv+Y5D7QlZY
JUjBxO4BIlX2xsAvz/fbNGjFhsJlQr9IArV9nwyTxAefSgx2c8cnbSSKodlvfIkeqGBR
iDkaVFwulwsypHDqh1VLVw+ivHp1YckWx2GrwVplF6s4pppGiIt7IRXAUQyuFM8QiIQO
IDT9tnAEt9yGgpBYvsmNoDm1iaYkR4QU4kvrVdkjWoopPCJbctHDQMC0gSpvxEe1GEQ7
kJVA==
X-Gm-Message-State: ACrzQf1IvzCZvi19BKQp4npCyvU/zqpGK8g2YiswG2kUhVPD5gZ594n0
FXH/yNdQp8qhjIvaNeSpQwYKtreM0KG9fD7ZoFkgHywR
X-Google-Smtp-Source: AMsMyM52Uhi9VZs3Ta7PldoepWS0A9cYGy/IALfJ7APUh5B1bZxVBIQS6ZOu6E8WG9mEnBsctjfSvdu83aIJsMgZOvE=
X-Received: by 2002:a63:6bc5:0:b0:460:bd9a:64b8 with SMTP id
g188-20020a636bc5000000b00460bd9a64b8mr6144766pgc.257.1665343111173; Sun, 09
Oct 2022 12:18:31 -0700 (PDT)
In-Reply-To: <00893b0c-e367-6fc9-cdae-f0ee42bc16c0@vub.be>
X-Content-Filtered-By: Mailman/MimeDel 2.1.39
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <CABaFrRaaXAz6ZygQNpp2LTNgVMh+hv55RoBv+ZS7E8s4ki83+w@mail.gmail.com>
X-Mailman-Original-References: <a95001e1-b60e-63ce-d363-30481d115282@vub.be>
<CABaFrRayYinb9Cd1w=iAz1NWmt6MOzam1yEYXPaAMjREriVUAg@mail.gmail.com>
<00893b0c-e367-6fc9-cdae-f0ee42bc16c0@vub.be>
 by: Avi Gross - Sun, 9 Oct 2022 19:18 UTC

Antoon, it may also relate to an interpreter versus compiler issue.

Something like a compiler for C does not do anything except write code in
an assembly language. It can choose to keep going after an error and start
looking some more from a less stable place.

Interpreters for Python have to catch interrupts as they go and often run
code in small batches. Continuing to evaluate after an error could cause
weird effects.

So what you want is closer to a lint program that does not run code at all,
or merely writes pseudocode to a file to be run faster later.

Many languages now have blocks of code that are not really be evaluated
till later. Some code is built on the fly. And some errors are not errors
at first. Many languages let you not declare a variable before using it or
allow it to change types. In some, the text is lazily evaluated as late as
possible.

I will say that often enough a program could report more possible errors.
Putting your code into multiple files and modules may mean you could
cleanly evaluate the code and return multiple errors from many modules as
long as they are distinct. Finding all errors is not possible if recovery
from one is not guaranteed.

Take a language that uses a semicolon to end a statement. If absent usually
there would be some error but often something on the next line. Your
evaluator could do an experiment and add a semicolon and try again. This
might work 90% of the time but sometimes the error was not ending the line
with a backslash to make it continue properly, or an indentation issue and
even spelling error. No guarantees.

Is it that onerous to fix one thing and run it again? It was once when you
handed in punch cards and waited a day or on very busy machines.

On Sun, Oct 9, 2022, 1:03 PM Antoon Pardon <antoon.pardon@vub.be> wrote:

>
>
> Op 9/10/2022 om 17:49 schreef Avi Gross:
> > My guess is that finding 100 errors might turn out to be misleading. If
> you
> > fix just the first, many others would go away.
>
> At this moment I would prefer a tool that reported 100 errors, which would
> allow me to easily correct 10 real errors, over the python strategy which
> quits
> after having found one syntax error.
>
> --
> Antoon.
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor