Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'subject:file': 0.07; 'filename': 0.09; 'filenames:': 0.09; 'indeed,': 0.09; 'repeated': 0.09; 'python': 0.11; "wouldn't": 0.14; 'read?': 0.16; 'subject:arithmetic': 0.16; 'all.': 0.16; 'to:name:python- list@python.org': 0.22; 'certainly': 0.24; 'received:65.55.116': 0.24; 'subject:/': 0.26; 'header:In-Reply-To:1': 0.27; 'skip:- 40': 0.29; 'code': 0.31; 'file': 0.32; 'something': 0.35; 'but': 0.35; 'should': 0.36; 'list': 0.37; 'to:addr:python-list': 0.38; 'rather': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'easy': 0.60; 'email addr:gmail.com': 0.63; 'obvious': 0.74; 'oscar': 0.84 X-TMN: [xYZIRhtop6dHqe3VR9Idh2yzFme5HaDs] X-Originating-Email: [carlosnepomuceno@outlook.com] From: Carlos Nepomuceno To: "python-list@python.org" Subject: RE: file I/O and arithmetic calculation Date: Thu, 23 May 2013 02:49:31 +0300 Importance: Normal In-Reply-To: References: , , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 22 May 2013 23:49:31.0386 (UTC) FILETIME=[01259DA0:01CE5747] X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369266640 news.xs4all.nl 15870 [2001:888:2000:d::a6]:52947 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:45758 ----------------------------------------=0A= > From: oscar.j.benjamin@gmail.com=0A= [...]=0A= >=0A= > Do you find this code easy to read? I wouldn't write something like=0A= > this and I certainly wouldn't use it when explaining something to a=0A= > beginner.=0A= >=0A= > Rather than repeated list comprehensions you should consider using a=0A= > single loop e.g.:=0A= >=0A= > for filename in filenames:=0A= > # process each file=0A= >=0A= > This will make the code a lot simpler.=0A= >=0A= >=0A= > Oscar=0A= =0A= Indeed=2C but for that you can use Pascal.=0A= =0A= List comprehensions it's what Python does best!=0A= =0A= The code is pretty obvious to me=2C I mean there's no obfuscation at all. = =