Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Debugging (was Re: Why not allow empty code blocks?) Date: Wed, 3 Aug 2016 00:58:58 +1000 Lines: 45 Message-ID: References: <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579ca644$0$1589$c3e8da3$5496439d@news.astraweb.com> <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de Pns/LQlB61pQQxWIhf0f9Q5/t9/2LeJVTa2BvU5TDT0g== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'restarting': 0.07; 'subject:code': 0.07; 'cc:addr:python-list': 0.09; '(int': 0.09; 'concurrent': 0.09; 'subject:Why': 0.09; 'python': 0.10; 'subject:not': 0.11; 'syntax': 0.13; 'useful,': 0.13; 'options.': 0.15; '2016': 0.16; '[1].': 0.16; 'dictionaries': 0.16; 'either;': 0.16; 'examples:': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'index;': 0.16; 'iterating': 0.16; 'iteration': 0.16; 'loops': 0.16; 'non-integers': 0.16; 'osx': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'shorthand': 0.16; 'subject:?)': 0.16; 'subject:allow': 0.16; 'sure.': 0.16; 'threads': 0.16; 'usenet': 0.16; 'wrote:': 0.16; 'gui': 0.18; 'language': 0.19; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'aug': 0.20; 'arguments': 0.22; 'commands,': 0.22; 'strip': 0.22; 'bit': 0.23; 'needed.': 0.23; "python's": 0.23; 'header:In-Reply-To:1': 0.24; 'all.': 0.24; 'testing': 0.25; "i've": 0.25; "doesn't": 0.26; 'command': 0.26; 'sense': 0.26; 'external': 0.27; 'message-id:@mail.gmail.com': 0.27; 'executing': 0.27; 'function': 0.28; 'convenience': 0.29; "i'm": 0.30; 'code': 0.30; 'especially': 0.32; '[1]': 0.32; 'language.': 0.32; 'languages': 0.34; 'tue,': 0.34; 'file': 0.34; 'membership': 0.34; 'lists': 0.34; 'gives': 0.35; 'received:google.com': 0.35; 'could': 0.35; 'execution': 0.35; 'exist': 0.35; 'returning': 0.35; 'something': 0.35; 'item': 0.35; 'but': 0.36; 'keyword': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'url:en': 0.39; 'does': 0.39; "didn't": 0.39; 'some': 0.40; 'real': 0.62; 'more': 0.63; 'places': 0.64; 'repeat': 0.67; 'expert': 0.70; 'miss': 0.77; 'gain': 0.82; 'about,': 0.84; 'chrisa': 0.84; 'gtk': 0.84; 'lacks': 0.84; 'pike': 0.84; 'short- hand': 0.84; 'url:function': 0.84; 'yearning': 0.84; 'url:php': 0.86; 'to:none': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:cc; bh=qs6KXgmTyuNK4TvX3WKaLOzkR7XlQN52MZsAezq02tI=; b=GsnQLez5bnGfK96xMNO24YJqSYN77JA1w4wyRflX2iI+umO5GDNK0lQDZuvSsFloYl tefn8OyTO/ZHHbKLqO+ozWODb4ThrsA1jZaKrG3PJZiR5hACDucMpfyMK74EWyx7HCdi 8W3HN97AofCzC5BdFb8Jihntinc0fm+zgHc76li3T6kSscDioHVhYqIGLGtyi60hOqZZ kB1TnfMGWMJ+XM0L3KwBQNvl9ziIvXRiuD4hz6DhFimgwws2yOakqcOuKL6ElIOhzcRD 3QMLtbsinJGtSFTfPWNmirp5tRMMPt2yCrk/z50pBHxqcLrCdx+ASDifQUaNMMQjSau/ h4eA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc; bh=qs6KXgmTyuNK4TvX3WKaLOzkR7XlQN52MZsAezq02tI=; b=kYXd5Y43jQJDwd2/86Znp3tG3aPlcKZtyal6pLk8D/bXzWMWnc/TvJKECTpAxCiCdt EAN77i2sKkZUuOiVbfD+ng8ncpYURsL7xG/xaJF6i090jw1vr+d2o9IjND6Xj8FTjTKY Y6mlFgI7MP4sia+uZsqJ1b8dyfhFej75Te6L+AioqykZsVp0wpkGWl9iO4IE+0SiE1va WC0PMWDMgtI+zVo3bckC2IG1tFcElC9Ne1nJpen9KpkOqgNeNGNAFpl/o0zgf0Y9PQl4 mwJHDBBAbxTkIQqgg/c7k93BImAispcrh8OkWx4W5qxP0If+coRBa/LNaxJZEkawzo/R CE4A== X-Gm-Message-State: AEkoousB+7MhpEL8eHiykFAuIy78tmgJc6aeSelXVeP7DHV1ji9U7rOlncRvGpwFePPTRDpR1zTziUCTzFOEbQ== X-Received: by 10.194.114.9 with SMTP id jc9mr56446992wjb.30.1470149939128; Tue, 02 Aug 2016 07:58:59 -0700 (PDT) In-Reply-To: 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: X-Mailman-Original-References: <579B1ABB.1070500@rece.vub.ac.be> <579c2095$0$22142$c3e8da3$5496439d@news.astraweb.com> <579ca644$0$1589$c3e8da3$5496439d@news.astraweb.com> <579ccc68$0$1583$c3e8da3$5496439d@news.astraweb.com> <579d5e2d$0$1612$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:112228 On Tue, Aug 2, 2016 at 9:05 PM, BartC wrote: > I think the real reason is not willing to admit that the language lacks > something that could actually be useful, and especially not to an upstart on > usenet who is not even an expert in that language. I know what features I miss from the languages I use most frequently. Here, let me help you out a bit with some examples: Python - Support for live code reloads without restarting the process - A more free-form declarative syntax for laying out GUI code - Arbitrary-precision non-integers - Convenient syntax for a few array/list manipulations - Truly concurrent threads - Extreme short-hand for executing external commands, the way REXX does Pike - Keyword arguments - "obj in collection" syntax for membership testing - Better documentation in places - Out-of-the-box GTK support on OSX - As with Python, external command execution shorthand Notice that I did not put "Bracey syntax" under Python, nor "Braceless syntax" under Pike, despite them not having those options. Notice also that I didn't put "simpler loop syntax" in either; Python's loops you know about, and Pike gives you the C-style "for (int i=0; i<10; ++i)" form and "foreach (collection, item)" like Python's "for item in collection". The only thing I might yearn for - *MIGHT* - would be for Python to gain an "index-and-value" iteration form like Pike's "foreach (collection; index; value)", which for dictionaries would be like iterating over .items(), and for lists would be like using enumerate(). But I've never actually found myself yearning for it while I'm writing Python code - it's a small convenience when I'm working in Pike, is all. Does Python "lack" the simple repeat statement? Well, in the sense that it doesn't have it, sure. But Python also doesn't have a single function to read a line from a gzipped file and strip HTML tags from it before returning it [1]. Not everything that doesn't exist is needed. ChrisA [1] http://php.net/manual/en/function.gzgetss.php