Issue614557
Created on 2002-09-25 18:17 by gvanrossum, last changed 2022-04-10 16:05 by admin.
| Messages (7) | |||
|---|---|---|---|
| msg60274 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2002-09-25 18:17 | |
I really wish that KeyError, AttributeError, NameError and IndexError provided clean APIs for getting at the missing key, name, or index. (Suggested by Jim Fulton) |
|||
| msg60275 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2002-09-26 18:19 | |
Logged In: YES user_id=21627 For KeyError, isn't it e.args[0]? For the others, I suggest that args[0] is the string, args[1] is the parameter. As a result, those classes need a __str__ which returns args[0]. |
|||
| msg60276 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2002-09-26 19:16 | |
Logged In: YES user_id=6380 Yes, it's args[0] for KeyError, but Jim objected that this is a rather obscure protocol; he would prefer to have a designated attribute. |
|||
| msg61280 - (view) | Author: Georg Brandl (georg.brandl) * ![]() |
Date: 2008-01-20 12:28 | |
Will this be revisited for py3k? |
|||
| msg61475 - (view) | Author: Guido van Rossum (gvanrossum) * ![]() |
Date: 2008-01-22 01:53 | |
I think it would be a good idea to revisit this for py3k, but I'm out of round tuits. Anyone else want to tackle this? It should ideally be done in such a way that non-core object types can also easily raise these exceptions with the appropriate attributes, both from C and from Python. |
|||
| msg107340 - (view) | Author: Alexander Belopolsky (belopolsky) * ![]() |
Date: 2010-06-08 20:16 | |
It looks like issue2651 is the first step for this. See msg66432. I am merging the nosy lists. |
|||
| msg222419 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2014-07-06 21:37 | |
See also #18156, #18163, #18165 and #18166, possibly others? |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-10 16:05:42 | admin | set | github: 37218 |
| 2020-10-23 18:11:42 | iritkatriel | set | versions: - Python 3.8, Python 3.9 |
| 2020-10-22 22:55:24 | iritkatriel | set | versions: + Python 3.8, Python 3.9, Python 3.10, - Python 3.2 |
| 2019-04-26 18:32:44 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2014-07-06 21:37:03 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg222419 |
| 2010-08-05 16:21:10 | belopolsky | set | assignee: belopolsky -> |
| 2010-06-08 20:16:51 | belopolsky | set | assignee: belopolsky dependencies: + Strings passed to KeyError do not round trip type: enhancement versions: + Python 3.2, - Python 3.0 nosy: + amaury.forgeotdarc, belopolsky, pitrou, rharris messages:
+ msg107340 |
| 2009-01-06 05:06:53 | gvanrossum | set | assignee: gvanrossum -> (no value) nosy: - gvanrossum |
| 2008-01-22 01:53:46 | gvanrossum | set | messages: + msg61475 |
| 2008-01-20 12:28:07 | georg.brandl | set | nosy:
+ georg.brandl messages: + msg61280 versions: + Python 3.0 |
| 2002-09-25 18:17:08 | gvanrossum | create | |
