Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #8431
| References | (1 earlier) <96gb36Fc65U1@mid.individual.net> <iu00uh2dhg@news3.newsguy.com> <96itucFadiU1@mid.individual.net> <iu2kif0coj@news4.newsguy.com> <87d3i2oiyo.fsf@benfinney.id.au> |
|---|---|
| Date | 2011-06-25 13:55 +1000 |
| Subject | Re: those darn exceptions |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.401.1308974152.1164.python-list@python.org> (permalink) |
On Sat, Jun 25, 2011 at 10:25 AM, Ben Finney <ben+python@benfinney.id.au> wrote: > No. The answer is *still* “why, any exception at all”. The name > ‘os.read’ could be re-bound at run-time to any object at all, so a code > checker that you “point at any given line of code” can't know what the > name will be bound to when that line gets executed. Sure it can. And KeyboardInterrupt could be raised at any time, too. But this is a TOOL, not a deity. If Function X is known to call Function Y and built-in method Z, and also raises FooException, then X's list of "most likely exceptions" would be FooException + Y.__exceptions__ + Z.__exceptions__. It won't be perfect, but it'd be something that could go into an autodoc-style facility. Obviously you can fiddle with things, but in _ordinary usage_ this is what it's _most likely_ to produce. Chris Angelico
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
those darn exceptions Chris Torek <nospam@torek.net> - 2011-06-21 01:43 +0000
Re: those darn exceptions Chris Angelico <rosuav@gmail.com> - 2011-06-21 13:19 +1000
Re: those darn exceptions Chris Torek <nospam@torek.net> - 2011-06-21 04:40 +0000
Re: those darn exceptions Ben Finney <ben+python@benfinney.id.au> - 2011-06-21 14:04 +1000
Re: those darn exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-21 09:49 +0000
Re: those darn exceptions Chris Torek <nospam@torek.net> - 2011-06-21 21:51 +0000
Re: those darn exceptions John Nagle <nagle@animats.com> - 2011-06-27 11:52 -0700
Re: those darn exceptions Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-06-23 20:16 +1200
Re: those darn exceptions Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-06-23 18:40 +1000
Re: those darn exceptions Chris Torek <nospam@torek.net> - 2011-06-23 18:33 +0000
Re: those darn exceptions Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-06-24 19:50 +1200
Re: those darn exceptions Chris Torek <nospam@torek.net> - 2011-06-24 18:21 +0000
Re: those darn exceptions Ben Finney <ben+python@benfinney.id.au> - 2011-06-25 10:25 +1000
Re: those darn exceptions Chris Angelico <rosuav@gmail.com> - 2011-06-25 13:55 +1000
Re: those darn exceptions steve+comp.lang.python@pearwood.info - 2011-06-26 00:28 +1000
Re: those darn exceptions Chris Angelico <rosuav@gmail.com> - 2011-06-26 01:52 +1000
csiph-web