Path: csiph.com!au2pb.net!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!nzpost1.xs4all.net!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:file': 0.07; 'lengths': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'output': 0.13; 'hits': 0.16; 'occurence': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:Reading': 0.16; 'substitutes': 0.16; 'wrote:': 0.16; 'input': 0.18; '>>>': 0.20; 'are.': 0.22; 'trying': 0.22; 'am,': 0.23; 'code.': 0.23; 'seems': 0.23; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'this.': 0.28; 'looks': 0.29; 'that.': 0.30; 'curious': 0.33; 'equal': 0.34; 'list': 0.34; 'item': 0.35; 'to:addr:python-list': 0.36; 'subject:: ': 0.37; 'really': 0.37; 'two': 0.37; 'being': 0.37; 'received:org': 0.37; 'mean': 0.38; 'does': 0.39; 'subject:from': 0.39; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'your': 0.60; 'here.': 0.62; '...and': 0.84; 'mistakes.': 0.84; 'otten': 0.84; 'wrong...': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Peter Otten <__peter__@web.de> Subject: Re: Reading \n unescaped from a file Date: Thu, 03 Sep 2015 16:24:03 +0200 Organization: None References: <55E65909.2080507@medimorphosis.com.au> <55E8078F.7090502@bluewin.ch> <55E84D1F.5040205@bluewin.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Gmane-NNTP-Posting-Host: p57bd809e.dip0.t-ipconnect.de User-Agent: KNode/4.13.3 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1441290268 news.xs4all.nl 23861 [2001:888:2000:d::a6]:40657 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:95936 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?