Movatterモバイル変換


[0]ホーム

URL:


[Python-Dev] PEP,take 2: Exception Reorganization for Python 3.0

tanzer@swing.co.attanzer at swing.co.at
Fri Aug 5 10:12:25 CEST 2005


James Y Knight <foom at fuhm.net> wrote: > > OK, I'm changing my mind again about the names again.> >> > Exception as the root and StandardError can stay; the only new> > proposal would then be to make bare 'except:' call StandardError.>> I don't see how that can work. Any solution that is expected to> result in a usable hierarchy this century must preserve "Exception"> as the object that user exceptions should derive from (and therefore> that users should generally catch, as well). There is way too much> momentum behind that to change it.Well, in the last few years I always derived my own exceptions fromStandardError and used `except StandardError` instead of `exceptException`.And I'd love to get rid of the    except KeyboardInterrupt:        raiseclause I currently have to write before any `exceptStandardError`. -- Christian Tanzerhttp://www.c-tanzer.at/


More information about the Python-Devmailing list

[8]ページ先頭

©2009-2025 Movatter.jp