Re: Iterate through dictionary of file objects and file names

2005-02-12 Thread Julian Yap
Brian Beck wrote: File objects as keys sounds pretty dangerous. I'm curious why the first thought that popped into your head wasn't using the file NAMES as keys instead? Here's my go at it. (Is Google Groups nice to indentation using spaces? I can't remember.) optionalFiles = dict.fromkeys(['ar

Iterate through dictionary of file objects and file names

2005-02-12 Thread Julian Yap
Hi all, I'm trying to get some ideas on the best way to do this. In this particular coding snippet, I was thinking of creating a dictionary of file objects and file names. These would be optional files that I could open and parse. At the end, I would easily close off the files by iterating thr