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

Not all code has to be written for everyone. Not all code will be read by the masses. Some code you write for yourself... an expression of who you are, how you think...

While my own quirks are not as visually entertaining, I think it's another mark in Python's favor that such self-expression is possible, and functional.

Yes, Lawrence, I do love writing fun code.

~ethan~
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to