On Sat, Oct 3, 2009 at 8:29 PM, Steven D'Aprano <steve at pearwood.info> wrote: > I could show a thousand other examples. It simply isn't true that all, > or even most, modules have their own exception types. I might be wrong on this. Your point is extra true for modules in the standard library (which is what we're talking about for argparse). I just think that if a parser error is causing the SystemExit, I would rather catch a parser error than catching a SystemExit for the sake of readability. It saves me the comments: # Catching SystemExit because parse_args() throws SystemExit on parser errors. # Subclassing ArgumentParser and overriding exit because I don't want to exit() upon parser errors. So I'm sorry if what I said was irrelevant. I've never written or taken part of writing a std-lib module. --yuv
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