[Python-Dev] os.path.walk() lacks 'depth first' option (original) (raw)
Jeremy Fincher fincher.8@osu.edu
Mon, 21 Apr 2003 12:56:42 -0400
- Previous message: [Python-Dev] os.path.walk() lacks 'depth first' option
- Next message: [Python-Dev] os.path.walk() lacks 'depth first' option
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sunday 20 April 2003 10:12 pm, Tim Peters wrote:
if 'CVS' in dirs: dirs.remove('CVS')
This code brought up an interesting question to me: if sets have a .discard method that removes an element without raising KeyError if the element isn't in the set, should lists perhaps have that same method?
On another related front, sets (in my Python 2.3a2) raise KeyError on a .remove(elt) when elt isn't in the set. Since sets aren't mappings, should that be a ValueError (like list raises) instead?
Jeremy
- Previous message: [Python-Dev] os.path.walk() lacks 'depth first' option
- Next message: [Python-Dev] os.path.walk() lacks 'depth first' option
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]