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


Groups > comp.lang.python > #21820

Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct

Path csiph.com!usenet.pasdenom.info!news.albasani.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torriem@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.05; 'python': 0.08; 'variables,': 0.09; 'am,': 0.12; 'code?': 0.16; 'from:addr:torriem': 0.16; 'from:name:michael torrie': 0.16; 'gotos': 0.16; 'saying,': 0.16; 'subject: \n ': 0.16; 'subject:Programming': 0.16; 'such.': 0.16; 'unhelpful': 0.16; 'language': 0.16; 'wrote:': 0.18; '>>>': 0.18; 'rewrite': 0.18; 'suggest': 0.20; 'so.': 0.22; "doesn't": 0.22; 'header:In-Reply- To:1': 0.22; 'appear': 0.23; 'way?': 0.23; 'suggestion': 0.26; 'code.': 0.26; 'code': 0.26; 'message-id:@gmail.com': 0.31; 'michael': 0.31; 'there': 0.33; 'header:User-Agent:1': 0.33; 'to:addr:python-list': 0.35; 'received:org': 0.36; 'created': 0.37; 'but': 0.37; 'using': 0.37; 'subject:with': 0.37; 'received:192': 0.38; 'resulting': 0.38; 'doing': 0.38; 'should': 0.38; 'difficult': 0.39; 'recommended': 0.39; 'everyone': 0.39; 'to:addr:python.org': 0.40; 'your': 0.61; 'subject:. ': 0.63; 'here.': 0.64; 'anything.': 0.71; '08:45': 0.84
X-Virus-Scanned amavisd-new at torriefamily.org
Date Sat, 17 Mar 2012 09:53:23 -0600
From Michael Torrie <torriem@gmail.com>
User-Agent Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.24) Gecko/20111108 Fedora/3.1.16-1.fc14 Lightning/1.0b3pre Thunderbird/3.1.16
MIME-Version 1.0
To python-list@python.org
Subject Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct
References <gR09r.22645$I33.16090@uutiset.elisa.fi> <4f64a3a0$0$1386$4fafbaef@reader2.news.tin.it> <mailman.758.1331996530.3037.python-list@python.org> <4f64a9e5$0$1385$4fafbaef@reader2.news.tin.it>
In-Reply-To <4f64a9e5$0$1385$4fafbaef@reader2.news.tin.it>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.759.1331999612.3037.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1331999612 news.xs4all.nl 6883 [2001:888:2000:d::a6]:41726
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:21820

Show key headers only | View raw


On 03/17/2012 09:12 AM, Kiuhnm wrote:
> On 3/17/2012 16:01, Michael Torrie wrote:
>> On 03/17/2012 08:45 AM, Kiuhnm wrote:
>>> Your way is easy, but the result is poor.
>>
>> In what way?
> 
> The resulting code is inefficient, difficult to comprehend and to mantain.
> 
>> What is your recommended way?
> 
> One should rewrite the code. There is a reason why Python doesn't have 
> gotos.

We appear to have a language barrier here.  How should one rewrite the
code?  Everyone knows python doesn't have gotos and state machines have
to be created using other mechanisms like loops, state variables, and
such.  Your suggestion to "rewrite the code" is unhelpful to the OP if
you're not willing to suggest the best method for doing so.  Saying, "be
like a decompiler" doesn't say anything.

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


Thread

Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-03-17 16:03 +0200
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Mel Wilson <mwilson@the-wire.com> - 2012-03-17 10:39 -0400
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-17 15:45 +0100
    Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Michael Torrie <torriem@gmail.com> - 2012-03-17 09:01 -0600
      Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-17 16:12 +0100
        Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Michael Torrie <torriem@gmail.com> - 2012-03-17 09:53 -0600
          Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-17 18:55 +0100
            Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Michael Torrie <torriem@gmail.com> - 2012-03-17 17:28 -0600
              Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-18 01:54 +0000
                Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-18 11:03 +0000
              Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-19 02:02 +0100
                Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-03-19 01:02 -0400
                Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Kiuhnm <kiuhnm03.4t.yahoo.it> - 2012-03-19 11:24 +0100
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Roy Smith <roy@panix.com> - 2012-03-17 11:47 -0400
    Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Antti J Ylikoski <antti.ylikoski@tkk.fi> - 2012-03-17 18:31 +0200
      Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct John Nagle <nagle@animats.com> - 2012-03-17 11:44 -0700
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Evan Driscoll <driscoll@cs.wisc.edu> - 2012-03-17 21:59 -0500
  Re: Programming D. E. Knuth in Python with the Deterministic Finite Automaton construct Albert van der Horst <albert@spenarnc.xs4all.nl> - 2012-03-18 11:08 +0000

csiph-web