Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Herkermer Sherwood Newsgroups: comp.lang.python Subject: for / while else doesn't make sense Date: Thu, 19 May 2016 09:31:39 -0700 Lines: 16 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de 4xF9g8Uddd44RKniWPQVcgRCcInqQ+KE/EiLibK+lbzA== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.015 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'semantics': 0.09; 'subject:while': 0.09; 'utilizing': 0.09; 'received:209.85.218': 0.10; 'python': 0.10; 'language,': 0.11; '"finally"': 0.16; 'keyword.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'sense,': 0.16; 'subject:make': 0.16; 'think?': 0.16; "wouldn't": 0.16; 'language': 0.19; 'all,': 0.20; 'sense': 0.26; 'message- id:@mail.gmail.com': 0.27; 'another': 0.32; 'good.': 0.32; 'skip:& 20': 0.35; 'received:google.com': 0.35; 'but': 0.36; 'should': 0.36; 'there': 0.36; 'received:209.85': 0.36; 'keyword': 0.36; 'structures': 0.36; 'to:addr:python-list': 0.36; 'skip:& 10': 0.37; 'itself': 0.38; 'received:209': 0.38; 'to:addr:python.org': 0.40; 'skip:u 10': 0.61; 'here.': 0.62; 'subject: / ': 0.63; 'great': 0.63; 'elsewhere': 0.66; 'subject:else': 0.84; 'subject:sense': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=ICgz2itpYFvANSzYdbn9+vhRV+VXHMu6iQ0RPAAmHug=; b=Xjs7eyCm6DCKtSXRo16LpcQe6FNKmAAylypjbxptXv2gR1JrN/6OnzCCdvERAUDMCt wdEhM8JewZAqnifwNSUylHbU7P7pCzoPNfta89UKA80CvVaJxUCjis40YL3S7uAzJ0CJ 3YofWgU/WXL8iJEfInm9Pk0gdfns/LJ+Wpr+8QW6VURG84fM8eG8J6mXBiYHAZ6RkbAr 40Zy2vh5kAO9DBYyx/LOXQsrjdq23YjbmA6s3985lYR+DXLgy08NLZ04U6dt7BMws0gR /qWmsJF8YatrNWDrtXaqQFBPYNtt4yp97hNjrfJl/lJaePuOTjT0tlvHaas7P6byM7NT 7y0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=ICgz2itpYFvANSzYdbn9+vhRV+VXHMu6iQ0RPAAmHug=; b=DNRWu0DFMi7EsA6EvJXuskroi5X6YZ5ltlkFlbadntIW+Hr5aEbC705oGXyg6PTFfn pZKIweFXx8nPRqmpa/6spx6xwKby+8OHkRfMdi6XHGGmVrGqIQcOAHob9+4LPPlFK6tC vPDHW7TIgwF5lIhQZ/4VulHb0ruMnMRN9V0OmS1B7W/kTTMFd7771aSappWE/KpxaCfQ Oj2ccW89R2FIuxSlTeC7/wDIOlua6O/cpsbv+ZoKvc7G1sEAqixbJ1jfcBnp836H5tjN 3f01Rnnq5MgeqCu1lL92klJ5A9cocbWD8Fsj31lFEYehqvHMLI928Yy9EyI0TkWyJstT v6AQ== X-Gm-Message-State: AOPr4FU+1JXJjXedCxZr7bzH4sGFVPHEdlata9EwYF+uzxk+VYak8rR0K8s5AxR3UruuWGoSGUAz7bqAyctQWA== X-Received: by 10.202.62.215 with SMTP id l206mr8870147oia.19.1463675519070; Thu, 19 May 2016 09:31:59 -0700 (PDT) X-Mailman-Approved-At: Thu, 19 May 2016 12:43:39 -0400 X-Content-Filtered-By: Mailman/MimeDel 2.1.22 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: Xref: csiph.com comp.lang.python:108830 Most keywords in Python make linguistic sense, but using "else" in for and while structures is kludgy and misleading. I am under the assumption that this was just utilizing an already existing keyword. Adding another like "andthen" would not be good. But there is already a reserved keyword that would work great here. "finally". It is already a known keyword used in try blocks, but would work perfectly here. Best of all, it would actually make sense. Unfortunately, it wouldn't follow the semantics of try/except/else/finally. Is it better to follow the semantics used elsewhere in the language, or have the language itself make sense semantically? I think perhaps "finally" should be added to for and while to do the same thing as "else". What do you think?