SV: Python Productivity over C++
Moshe Zadka
moshez at math.huji.ac.il
Wed Jun 14 16:43:19 EDT 2000
On Wed, 14 Jun 2000, Eric Lee Green wrote:
> Michal Vitecek wrote:
> > this is highly debatable - properly written C/C++ source is pretty well
> > readable and self-documenting. similarly, badly written python source
> > makes it as unreadable as in other languages - there's not a point in
> > trying to prevent people from writing (un)readable source code.
>
> It's harder to write unreadable Python source because you can't write code
> like, hmm,
>
> opendir(FOO,\"%s\");@files=readdir(FOO);foreach (@files) { if
> (/^[^\\.].*\\.txt$/) { print \"%s/$_\\n\";};};closedir(FOO);
import os,re
for _ in os.path.listdir("%s"): if re.match("^[^.].*\.txt$': print(
"%%s/%(_)s" % vars())
writing-obfuscated-python-isn't-that-easy-ly y'rs, Z.
--
Moshe Zadka <moshez at math.huji.ac.il>
http://www.oreilly.com/news/prescod_0300.html
http://www.linux.org.il -- we put the penguin in .com
More information about the Python-list
mailing list