Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Aleksander Alekseev Newsgroups: comp.lang.python Subject: How to make Python interpreter a little more strict? Date: Fri, 25 Mar 2016 15:06:08 +0300 Lines: 26 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 5HhQd23b24G6z7bJ4OpyXgCd1c2+VqQf0p65LPeKQfKQ== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.054 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:Python': 0.05; 'python3': 0.05; 'subject:How': 0.09; 'bug': 0.10; 'python': 0.10; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:make': 0.16; 'this:': 0.23; 'skip:# 10': 0.27; 'cat': 0.29; 'complain': 0.29; 'code': 0.30; 'maybe': 0.33; 'next': 0.35; 'possible': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'charset:us- ascii': 0.37; 'to:addr:python.org': 0.40; 'subject:more': 0.61; 'url:me': 0.64; 'spend': 0.67; 'hour': 0.69; 'received:93': 0.72; 'received:109': 0.75; 'received:ru': 0.81; 'case?': 0.84 X-Mailman-Approved-At: Sat, 26 Mar 2016 05:58:34 -0400 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:105731 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/