Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #45758
| 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 | <carlosnepomuceno@outlook.com> |
| 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 <carlosnepomuceno@outlook.com> |
| To | "python-list@python.org" <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 | <CAHVvXxR-5-s6GBY0nR_J--w=+T1SyeauCkEr_Frncj+trE=aWg@mail.gmail.com> |
| References | <CAHVvXxR-5-s6GBY0nR_J--w=+T1SyeauCkEr_Frncj+trE=aWg@mail.gmail.com> |
| 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 <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1980.1369266640.3114.python-list@python.org> (permalink) |
| 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 |
Show key headers only | View raw
---------------------------------------- > From: oscar.j.benjamin@gmail.com [...] > > Do you find this code easy to read? I wouldn't write something like > this and I certainly wouldn't use it when explaining something to a > beginner. > > Rather than repeated list comprehensions you should consider using a > single loop e.g.: > > for filename in filenames: > # process each file > > This will make the code a lot simpler. > > > Oscar Indeed, but for that you can use Pascal. List comprehensions it's what Python does best! The code is pretty obvious to me, I mean there's no obfuscation at all.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
RE: file I/O and arithmetic calculation Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-23 02:49 +0300
csiph-web