<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <font face="Courier New, Courier, monospace">My response was meant
      for the list, but went to Peter by mistake. So I repeat it with
      some delay:</font><br>
    <br>
    <div class="moz-cite-prefix">On 09/03/2015 04:24 PM, Peter Otten
      wrote:<br>
    </div>
    <blockquote cite="mid:ms9l67$6ro$1@ger.gmane.org" type="cite">
      <pre wrap="">Friedrich Rentsch wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">On 09/03/2015 11:24 AM, Peter Otten wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">Friedrich Rentsch wrote:
</pre>
        </blockquote>
      </blockquote>
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <pre wrap="">I appreciate your identifying two mistakes. I am curious to know what
they are.
</pre>
      </blockquote>
      <pre wrap="">
Sorry for not being explicit.

</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">              substitutes = [self.table [item] for item in hits if item
in valid_hits] + []  # Make lengths equal for zip to work right
</pre>
          </blockquote>
          <pre wrap="">That looks wrong...
</pre>
        </blockquote>
      </blockquote>
      <pre wrap="">
You are adding an empty list here. I wondered what you were trying to 
achieve with that.
</pre>
    </blockquote>
    Right you are! It doesn't do anything. I remember my idea was to pad
    the substitutes list by one, because the list of intervening text
    segments is longer by one element and zip uses the least common
    length, discarding all overhang. The remedy was totally ineffective
    and, what's more, not needed, judging by the way the editor performs
    as expected.
    <blockquote cite="mid:ms9l67$6ro$1@ger.gmane.org" type="cite">
      <pre wrap="">
</pre>
      <blockquote type="cite">
        <blockquote type="cite">
          <blockquote type="cite">
            <pre wrap="">                  output = input
</pre>
          </blockquote>
          <pre wrap="">...and so does this.
</pre>
        </blockquote>
      </blockquote>
      <pre wrap="">
That seems to be the only occurence of the name "input" in your code. Did 
you mean "text" or do you really want to return the built-in?

</pre>
    </blockquote>
    Right you are again! I did mean text. I changed a few names to make
    them more suggestive, and apparently missed this one.
    <br>
    <br>
    Frederic
  </body>
</html>