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


Groups > comp.lang.python > #95936

Re: Reading \n unescaped from a file

From Peter Otten <__peter__@web.de>
Subject Re: Reading \n unescaped from a file
Date 2015-09-03 16:24 +0200
Organization None
References <55E65909.2080507@medimorphosis.com.au> <55E8078F.7090502@bluewin.ch> <ms93ke$tkj$1@ger.gmane.org> <55E84D1F.5040205@bluewin.ch>
Newsgroups comp.lang.python
Message-ID <mailman.68.1441290268.8327.python-list@python.org> (permalink)

Show all headers | View raw


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?

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


Thread

Re: Reading \n unescaped from a file Peter Otten <__peter__@web.de> - 2015-09-03 16:24 +0200

csiph-web