Don't you just love writing this sort of thing :)
Cong Ma
cma at mail.bnu.edu.cn
Thu Dec 4 04:39:15 EST 2008
Lawrence D'Oliveiro wrote:
> for \
> Entry \
> in \
> sorted \
> (
> f for f in os.listdir(PatchesDir) if PatchDatePat.search(f) != None
> ) \
> :
> Patch = (open, gzip.GzipFile)[Entry.endswith(".gz")](os.path.join(PatchesDir, Entry), "r")
> ... read from Patch ...
> Patch.close()
> #end for
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
The "if ... != None" is not necessary... "if PatchDatePat.search(f)" is OK.
And I don't like it...
More information about the Python-list
mailing list