Reading \n unescaped from a file

Peter Otten __peter__ at web.de
Thu Sep 3 16:24:03 CEST 2015


Friedrich Rentsch wrote:

> On 09/03/2015 11:24 AM, Peter Otten wrote:
>> Friedrich Rentsch wrote:

> I appreciate your identifying two mistakes. I am curious to know what
> they are.

Sorry for not being explicit.

>>>               substitutes = [self.table [item] for item in hits if item
>>> in valid_hits] + []  # Make lengths equal for zip to work right
>> That looks wrong...

You are adding an empty list here. I wondered what you were trying to 
achieve with that.

>>>                   output = input
>> ...and so does this.

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?



More information about the Python-list mailing list