define loop statement?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • David Isaac

    #16
    Re: define loop statement?


    "Benji York" <benji@benjiyor k.com> wrote in message
    news:mailman.21 14.1140318344.2 7775.python-list@python.org ...[color=blue]
    > Here's a flagrant hack:[/color]

    Admiration wins out over revulsion. ;-)
    Thanks,
    Alan Isaac

    PS Here's the motivation. Python closely resembles pseudocode. With
    a very little LaTeX hacking, it is often possible to write algorithms is
    Python that typeset as reasonable pseudocode. A simple repetitive
    loop is a bit of a sticking point.


    Comment

    • Cameron Laird

      #17
      Re: define loop statement?

      In article <%50Kf.1181$p13 .791@trnddc08>,
      David Isaac <aisaac0@verizo n.net> wrote:

      Comment

      • Magnus Lycka

        #18
        Re: define loop statement?

        David Isaac wrote:
        [color=blue]
        > PS Here's the motivation. Python closely resembles pseudocode. With
        > a very little LaTeX hacking, it is often possible to write algorithms is
        > Python that typeset as reasonable pseudocode. A simple repetitive
        > loop is a bit of a sticking point.[/color]

        With slightly more LaTeX hacking or possibly Python hacking on your
        script before passing it to LaTeX, you might just be able to change
        occurences of

        for x in range(a, b):

        to

        for x in [a, b):

        or whatever, and get away with plain vanilla Python
        in your code...

        Comment

        Working...