Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #74719
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!feeder1.cambriumusenet.nl!82.197.223.108.MISMATCH!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.139.MISMATCH!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'syntax': 0.04; '*not*': 0.07; 'plenty': 0.07; 'ascii': 0.09; 'contexts': 0.09; 'cc:addr :python-list': 0.11; 'python': 0.11; '2.7': 0.14; '__future__': 0.16; 'different,': 0.16; 'directive': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'identifiers,': 0.16; 'identifiers;': 0.16; 'keyword,': 0.16; 'keywords)': 0.16; 'lexer': 0.16; 'non-ascii': 0.16; 'optional.': 0.16; 'targets': 0.16; 'think.': 0.16; 'applies': 0.16; 'language': 0.16; 'wrote:': 0.18; 'variable': 0.18; '(but': 0.19; 'subject:need': 0.19; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'instance,': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'gets': 0.27; 'header:In-Reply- To:1': 0.27; 'on,': 0.29; 'characters': 0.30; 'message- id:@mail.gmail.com': 0.30; 'context,': 0.31; 'helpful.': 0.31; 'quite': 0.32; 'worked': 0.33; 'cases': 0.33; 'fri,': 0.33; 'agree': 0.35; 'something': 0.35; 'johnson': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'half': 0.37; 'wrong': 0.37; 'pm,': 0.38; 'rather': 0.38; 'extremely': 0.39; 'sure': 0.39; 'even': 0.60; 'truly': 0.60; 'simple': 0.61; 'name': 0.63; 'jul': 0.74; '3.4': 0.84; 'colored': 0.84; 'partially': 0.84; 'technically': 0.84; 'absolutely': 0.87; 'to:none': 0.92; 'constitute': 0.93; 'rick': 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 :content-type; bh=bG21hwr5cxykNMZ56WHY9GlnL/NLj4LtfbohaiueLh4=; b=S02vqhQrbCUDl7WIqQSMhONqLaqFOHPjCsCNvZur08fTGJXnAcBEri/ujNgzGauwfV fRdG39z94yPZUXzLfRt4cz10SU7qYs4hWfj4HEsqG9Uf5ByFEGvAP/2N1qoDxFYFMYsM smPGL1yh6EKbw8fXbIzeVO9bHSCYS/80yFypIomcFjH51T/jJ4z0uTJ/Hn50O261UEDg JxKhxhiBcwGCu0t2y+bX2l9jnddIchPBYblspzwqztzw0BdvU2InJ2At+p/ocTDuhIOG D8mWYsaHRANg2GP3m/D5DabaK/c/VwzsThHQghoDmKDnuSpyFag/IQ8RjxXYBba17vY9 oWJQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.220.203.134 with SMTP id fi6mr1701027vcb.18.1405653830738; Thu, 17 Jul 2014 20:23:50 -0700 (PDT) |
| In-Reply-To | <a6a835d3-e39a-4a06-b6e9-e8370152a4fd@googlegroups.com> |
| References | <6239bcaa-828f-499b-936d-69d022bb94ac@googlegroups.com> <467108ec-19e7-4089-8d5f-53a80244adaf@googlegroups.com> <mailman.11933.1405617616.18130.python-list@python.org> <b38e352c-e125-46ca-af04-3e0de345009a@googlegroups.com> <mailman.11974.1405649023.18130.python-list@python.org> <a6a835d3-e39a-4a06-b6e9-e8370152a4fd@googlegroups.com> |
| Date | Fri, 18 Jul 2014 13:23:50 +1000 |
| Subject | Re: I need an idea for practise! |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.11979.1405653833.18130.python-list@python.org> (permalink) |
| Lines | 27 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1405653833 news.xs4all.nl 2865 [2001:888:2000:d::a6]:44563 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:74719 |
Show key headers only | View raw
On Fri, Jul 18, 2014 at 1:07 PM, Rick Johnson <rantingrickjohnson@gmail.com> wrote: > For me, only the following targets need colorizing: > > Keywords > Built-ins And be sure *not* to colorize built-ins (but *do* colorize keywords) in contexts where the tokens are actually identifiers, like "x.open = 1". Plus, if you want this to be truly general, you need to have it understand that some keywords aren't keywords if the shebang is different, although with 2.7 vs 3.4 that only really applies to nonlocal (if True/False/None are colored as keywords even though they're technically builtins, that's not a big deal); if you want to support Python 2.5, you'd also have to cope with a __future__ directive adding a keyword, but that's quite optional. It's not as simple as you might think. I've worked with plenty of syntax highlighters that get something wrong in some context, and it's extremely annoying; in some cases it makes the colorization actually harmful, rather than helpful. And it's absolutely *essential* that the lexer and the language agree on, for instance, what characters constitute identifiers; if I have a partially non-ASCII variable name and only the ASCII half of it gets highlighted, that can be highly distracting. ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
I need an idea for practise! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-07-17 02:59 -0700
Re: I need an idea for practise! alister <alister.nospam.ware@ntlworld.com> - 2014-07-17 10:13 +0000
Re: I need an idea for practise! Abhiram R <abhi.darkness@gmail.com> - 2014-07-17 19:03 +0530
Re: I need an idea for practise! Chris Angelico <rosuav@gmail.com> - 2014-07-18 00:20 +1000
Re: I need an idea for practise! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-17 09:34 -0700
Re: I need an idea for practise! Chris Angelico <rosuav@gmail.com> - 2014-07-18 03:20 +1000
Re: I need an idea for practise! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-17 12:30 -0700
Re: I need an idea for practise! Paul McNett <paul@mcnettware.com> - 2014-07-17 13:21 -0700
Re: I need an idea for practise! Chris Angelico <rosuav@gmail.com> - 2014-07-18 12:03 +1000
Re: I need an idea for practise! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-17 20:07 -0700
Re: I need an idea for practise! Chris Angelico <rosuav@gmail.com> - 2014-07-18 13:23 +1000
Re: I need an idea for practise! Rick Johnson <rantingrickjohnson@gmail.com> - 2014-07-17 21:06 -0700
Re: I need an idea for practise! Chris Angelico <rosuav@gmail.com> - 2014-07-18 16:00 +1000
Re: I need an idea for practise! Terry Reedy <tjreedy@udel.edu> - 2014-07-17 17:46 -0400
Re: I need an idea for practise! Chris Angelico <rosuav@gmail.com> - 2014-07-18 12:04 +1000
Re: I need an idea for practise! Orochi <kartikjagdale11@gmail.com> - 2014-07-17 11:05 -0700
Re: I need an idea for practise! AudreyJean <iamAudreyJean@gmail.com> - 2014-07-18 08:42 -0700
Re: I need an idea for practise! Nicholas Cannon <nicholascannon1@gmail.com> - 2014-07-17 19:03 -0700
csiph-web