Patches item #997726, was opened at 2004-07-25 22:21 Message generated for change (Comment added) made by gbrandl You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=997726&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Out of Date Priority: 5 Private: No Submitted By: Carl Henrik Holth Lunde (chlunde) Assigned to: Nobody/Anonymous (nobody) Summary: dircache fix; raise like os.listdir, plus optimization Initial Comment: I think it would be better if dircache.listdir acts like os.listdir on missing directories; raise os.error Additionally, I rewrote the logic so it's about 15% faster. If you remove the outer try-except-block which purges the cache for a folder on a miss it's 30% faster. This makes if five times as fast as os.listdir (with my program). Not sure if anybody cares about the speed, the thing I was surprised about was that dircache wasn't a drop-in replacement for listdir. ---------------------------------------------------------------------- >Comment By: Georg Brandl (gbrandl) Date: 2007-03-07 01:28 Message: Logged In: YES user_id=849994 Originator: NO Closing as "out of date". ---------------------------------------------------------------------- Comment By: Johannes Gijsbers (jlgijsbers) Date: 2004-08-21 11:11 Message: Logged In: YES user_id=469548 Could you take a look at the latest CVS revision? I think rev 1.12 and patch #707167 already make dircache raise os.error on missing directories. The optimization would be interesting, but you should post a diff against latest CVS (see http://python.org/dev/devfaq.html#how-to-make-a-patch) instead of a replacement file. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=997726&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches