Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Chris Angelico Newsgroups: comp.lang.python Subject: Re: Guido sees the light: PEP 8 updated Date: Wed, 20 Apr 2016 13:41:59 +1000 Lines: 33 Message-ID: References: <5711c1b3$0$1596$c3e8da3$5496439d@news.astraweb.com> <1460809922.1918014.580580553.0AE05EE4@webmail.messagingengine.com> <878u0d7az5.fsf@elektro.pacujo.net> <93639142-6b82-4b8a-8bd0-7f4593e1f692@googlegroups.com> <5716595b$0$1585$c3e8da3$5496439d@news.astraweb.com> <3d95437c-6427-46d2-8e9f-470f121194cd@googlegroups.com> <20160419124321.361751dc@bigbox.christie.dr> <1461092090.2638611.583593041.7C981FAD@webmail.messagingengine.com> <5716dda3$0$1621$c3e8da3$5496439d@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de IxRupRBx7Sc8VS32fxQCSgzvHpC5zlffWxU0mJu2bXhg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'else:': 0.03; 'received:209.85.223': 0.03; 'column': 0.07; 'subject:PEP': 0.07; 'cc:addr:python-list': 0.09; 'python': 0.10; 'python.': 0.11; 'causing': 0.13; 'def': 0.13; 'wed,': 0.15; '2016': 0.16; 'etc?': 0.16; 'fond': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'reedy': 0.16; 'scratch': 0.16; 'structure.': 0.16; 'wrote:': 0.16; 'of.': 0.18; 'shape': 0.18; 'gui': 0.18; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'correctly.': 0.22; 'code,': 0.23; 'header:In-Reply-To:1': 0.24; "i've": 0.25; 'message- id:@mail.gmail.com': 0.27; 'looks': 0.29; 'spaces': 0.29; 'code:': 0.29; "i'm": 0.30; 'code': 0.30; 'e.g.': 0.30; 'editor': 0.34; 'structure': 0.34; 'received:google.com': 0.35; 'next': 0.35; 'could': 0.35; 'text': 0.35; 'received:209.85': 0.36; 'possible': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'display': 0.37; 'received:209': 0.38; 'why': 0.39; 'subject:the': 0.39; 'some': 0.40; 'entire': 0.61; '20,': 0.66; 'color': 0.67; 'transfer': 0.73; 'chrisa': 0.84; 'reinforce': 0.84; 'x):': 0.84; 'to:none': 0.91; 'colour': 0.91; 'graphical': 0.91; 'tied': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc; bh=G3I/QAq2tek9B88jenik1u3029xrIkHpj+VqwN8m4yc=; b=JBa59xLzXcKR8CTuKOtE5bkgaHK62VgBWoPsuUoUMsoLvmOlP3+MvkRE2s+NKwV3fZ BnGdHfB/WAEg9wAZMicXbdwwANtzQbc0hBSpob5a/XFxTnjxcpORqYKTxx/I75P72HIw zsODzDBTda2FSHdmbs/yoC1uHU3gaU5O7sQAea6/BocP1uNGQ9T2uHXWLWRdNuam4hxH sYARSLjm24lLaPxG/EjNF4NbI4enMgTnKfC/138bCw42WuU+JSSlH7SL8LmjHw1Y2WhZ SRNRfwnTi1d9UFKiUNLX74NUe/rtjkn4At34k5txzy5NZW03cOJtiSkKi0ZicwWe2e+6 IgvA== 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:date :message-id:subject:from:cc; bh=G3I/QAq2tek9B88jenik1u3029xrIkHpj+VqwN8m4yc=; b=gAWkN+dnJOb9grPEYruMPJT9pO5VBbi92zKQ1tFxYh/7xTdG8N9fHEqP19WN5lOOPY dB3xYls08F+MuGSF5gZXSp+tUrUCNjhZuWNGvY6lQNKOrjLcrwI/N5cTnLcWveuBJ+8y TI6d26ghGPVqEi3fYA5f9eec3Lc67XP7roy2MSq4z97Vwl6c7Rd8kVfgGReL3hdNyozD 4Rryni38EU56t76kV+GBDPII9tiStTVClNwLxmZ2SmlL9LdGKugeFc2n5yaa4bplSShq ys/gMPTusJK551/TSUhmRCNc7opJuX4PZjs2FkQyllDN+OnCsnKtO0qP6u8yLegr+H/q oY5w== X-Gm-Message-State: AOPr4FXgWVXmGL8ujlgpSRcs1BZ/Gju8yS/O+0/FJdpbP7oF7l8kNpd9dGJEeeu8sFyuMHovOItuA4+Yr2mfkw== X-Received: by 10.107.18.147 with SMTP id 19mr6926666ios.157.1461123719687; Tue, 19 Apr 2016 20:41: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: <5711c1b3$0$1596$c3e8da3$5496439d@news.astraweb.com> <1460809922.1918014.580580553.0AE05EE4@webmail.messagingengine.com> <878u0d7az5.fsf@elektro.pacujo.net> <93639142-6b82-4b8a-8bd0-7f4593e1f692@googlegroups.com> <5716595b$0$1585$c3e8da3$5496439d@news.astraweb.com> <3d95437c-6427-46d2-8e9f-470f121194cd@googlegroups.com> <20160419124321.361751dc@bigbox.christie.dr> <1461092090.2638611.583593041.7C981FAD@webmail.messagingengine.com> <5716dda3$0$1621$c3e8da3$5496439d@news.astraweb.com> Xref: csiph.com comp.lang.python:107390 On Wed, Apr 20, 2016 at 1:23 PM, Terry Reedy wrote: >> It kinda looks like Hypertalk syntax, which some of you may remember I'm >> exceedingly fond of. There's no reason why a GUI editor couldn't display >> Python code using such "building block" structure. E.g. indented blocks >> could use colour and shape cues to reinforce the structure of the code, >> just as Scratch does. > > > That is an interesting idea. Perhaps I have been stuck in either/or > thinking -- either graphical or textual. With tk Text (IDLE), it would be > possible to tag each (4-space) indent with a color for the compound > statememt keywork causing the indent. > Interesting indeed! Tell me if I've understood you correctly. You'd display this code: def func(x): for n in range(1, x): while n < x: if n % 2: n = (n + 1) * 3 / 2 else: n = n * 2 + 3 with stripes of colour, with the entire first column of spaces all tied to the "def", and then the next block of four tied to the "for", etc? That'd be pretty cool, and a neat way to help people transfer their skills from Scratch to Python. (Would "else" be in the same colour as "if"? What about "elif"?) ChrisA