Path: csiph.com!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!feedme.news.telefonica.de!telefonica.de!fu-berlin.de!uni-berlin.de!not-for-mail From: Nick Sarbicki Newsgroups: comp.lang.python Subject: Re: How to make Python interpreter a little more strict? Date: Sat, 26 Mar 2016 10:02:49 +0000 Lines: 36 Message-ID: References: <20160325150608.21c3827a@fujitsu> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 6ZtwG4+z27MYh76xIAWweAveUkbB+lzKuGXY1t8Vri2Q== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.026 X-Spam-Evidence: '*H*': 0.95; '*S*': 0.00; 'subject:Python': 0.05; 'python3': 0.05; 'subject:How': 0.09; 'complaining': 0.09; 'bug': 0.10; 'python': 0.10; '2016': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:make': 0.16; 'wrote:': 0.16; 'to:2**1': 0.21; 'sat,': 0.23; 'this:': 0.23; 'header:In-Reply- To:1': 0.24; 'skip:# 10': 0.27; 'message-id:@mail.gmail.com': 0.27; 'cat': 0.29; 'complain': 0.29; 'url:mailman': 0.30; 'code': 0.30; 'maybe': 0.33; 'url:python': 0.33; 'url:listinfo': 0.34; 'received:google.com': 0.35; 'next': 0.35; 'received:74.125.82': 0.35; 'url:org': 0.36; 'possible': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'does': 0.39; 'url:mail': 0.40; 'to:addr:python.org': 0.40; 'subject:more': 0.61; 'url:me': 0.64; 'mar': 0.65; 'spend': 0.67; 'hour': 0.69; '26,': 0.72; 'about?': 0.84; 'case?': 0.84; 'expect.': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=EEbULDHNPMXV/jxLFmNup0A5LkVZTTpj5Y0I2ya3vsA=; b=y+1y0IC+/jiN4nNTdWb9JJUFuZN2C78lwkwNTdIN068+Tiv9lAqfXUQcVpuFxC3KBI I7YzUaTm8zDxJHOeqaIYMN41fXbtczQ1f85GbMLbLG/cNd2xwV+R143jxCOfCSJogOOV ttYn+fgIFd7g2Mey0kh5GQ+oTQfTUG352Pz8ZwI8RSdaBwao8u/TU5TsrgBdfQMC+pu6 4derfETszlkGB51ih/+zJ578ALxJTfPtXhqOWAYIyP/+burys8icjitUZAxZT49CZamF OuoZbMCgrj70NugN88/Vesj1YQbf6Fe/UyL0wqygeZqIFRWBZC8LmdRuEKVrBySKm4GT sqxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=EEbULDHNPMXV/jxLFmNup0A5LkVZTTpj5Y0I2ya3vsA=; b=aYUzLRhlDAw3s7fcyg0vSh4ErrpNjyN1qTGz906HrXABhrcRBH6LUhvkPGmKzC75cD afVAPdpinl7eLsJryi1nWYl7wioH07hSFeSxFYRY0l8YNrEg2ngXb+VaSxftffAUd7hb HnM695euDbvRvwe0ha6soUObRtk4jwa4LyZftJjtpzCOLQnoQTZFy0+oqe0k4BD5oFam xVxykLQP5bj1v/N2ncb/OVzrNQyTL3bVUm9ySBga+JuMwFX8dMr8hGmMRA98p1kELzgX mCCamVryzgAI0cjmFh4PF7STwTyH9zXXrIlE6rWwg2MnXcoXVzzTTsGrM1TiokhE/P9E EJxw== X-Gm-Message-State: AD7BkJLI7/3XM8vOpqXL9LfaQcskQCPPw3dDZRg1OT0UkFls7Y27lYmChAFbPIAsd6p9hMTEGHhMZ9r6GD7noQ== X-Received: by 10.194.95.198 with SMTP id dm6mr20437174wjb.136.1458986578836; Sat, 26 Mar 2016 03:02:58 -0700 (PDT) In-Reply-To: <20160325150608.21c3827a@fujitsu> X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:105737 On Sat, Mar 26, 2016 at 9:59 AM Aleksander Alekseev wrote: > Hello > > Recently I spend half an hour looking for a bug in code like this: > > eax@fujitsu:~/temp$ cat ./t.py > #!/usr/bin/env python3 > > for x in range(0,5): > if x % 2 == 0: > next > print(str(x)) > > eax@fujitsu:~/temp$ ./t.py > 0 > 1 > 2 > 3 > 4 > > Is it possible to make python complain in this case? Or maybe solve > such an issue somehow else? > > -- > Best regards, > Aleksander Alekseev > http://eax.me/ > -- > https://mail.python.org/mailman/listinfo/python-list What would it be complaining about? I don't see any issues, it does what I would expect.