Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #74709

Re: I need an idea for practise!

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>
Date 2014-07-18 12:03 +1000
Subject Re: I need an idea for practise!
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.11974.1405649023.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jul 18, 2014 at 5:30 AM, Rick Johnson
<rantingrickjohnson@gmail.com> wrote:
> But don't tell me for a *SECOND* that a colorizer, and a
> damn good one, can not be written utilizing regexps, because
> you're either wrong, or you're scared, or you're ignorant,
> or you're all of the above!

It might well be able to *utilize* regexps (as Terry showed, the one
in idlelib apparently does use them), but very few modern programming
languages can be fully and correctly defined within the limits of
regexp syntax. For instance, how can you recognize and thus colorize
assignments differently from name references, to distinguish between
"foo = 1" and "foo == 1"? Can you do that with a regexp? And there's
plenty more syntax that's tricky to define.

I might be wrong, and I might be ignorant, but I'm not scared. I know
what a regular expression can and can't do, and it's not fear to avoid
using them for jobs they can't do.

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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