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


Groups > comp.lang.python > #45758

RE: file I/O and arithmetic calculation

From Carlos Nepomuceno <carlosnepomuceno@outlook.com>
Subject RE: file I/O and arithmetic calculation
Date 2013-05-23 02:49 +0300
References <CAHVvXxR-5-s6GBY0nR_J--w=+T1SyeauCkEr_Frncj+trE=aWg@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.1980.1369266640.3114.python-list@python.org> (permalink)

Show all headers | 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


Thread

RE: file I/O and arithmetic calculation Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-23 02:49 +0300

csiph-web