[Python-Dev] Breaking bug #411881 into manageable pieces

Tim Peters tim.one@comcast.net
2002年3月19日 22:30:33 -0500


[Skip Montanaro]
> ...
> Attached are the notes I took while picking through the source.

If everyone would do the sensible thing and upgrade to Outlook, they'd have
no trouble reading your notes <wink>.
doctest.py: I Trust Tim (tm)
 Me too. The first bare except is exec'ing arbitrary user-supplied
 code, and needs to catch everything. The second needs to ignore
 any exception that may be raised by a user-define __str__, and
 that's any exception whatsoever, so ditto.
threading.py: I Trust Tim.
 The first needs to catch any exception that may leak out of the
 user's thread code, so can't be limited. The second is lazy:
 try:
 self.__delete()
 except:
 pass
 but can't be made stronger without guessing at all the exceptions
 self.__delete() may raise. You should shame Guido into catching
 the exceptions he thinks are "normal" in the body of self.__delete,
 and stop catching any at its call site. The answers aren't obvious
 to me, but I'm afraid this is one of those contexts where we can
 get into non-obvious trouble due to module globals getting None'd
 out when Python is shutting down. Better a Big Hammer than bogus
 shutdown errors.

AltStyle によって変換されたページ (->オリジナル) /