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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4