Message376754
For example:
>>> import pwd
>>> pwd.getpwnam("test")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: "getpwnam(): name not found: 'test'"
An improvement would be something which doesn't have the extra set of quotes such as:
>>> import pwd
>>> pwd.getpwnam("test")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: getpwnam(): name not found: 'test'
I understand this is due to the `KeyError` repr, I wonder if something could be done to improve this (maybe a subclass of KeyError? maybe a new optional named-only argument to KeyError?)
Seems there are others which could be improved here as well:
>>> import unicodedata
>>> unicodedata.lookup('zzz')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
KeyError: "undefined character name 'zzz'" |
|
Date |
User |
Action |
Args |
2020-09-12 00:17:04 | Anthony Sottile | set | recipients:
+ Anthony Sottile |
2020-09-12 00:17:04 | Anthony Sottile | set | messageid: <1599869824.76.0.302997879758.issue41767@roundup.psfhosted.org> |
2020-09-12 00:17:04 | Anthony Sottile | link | issue41767 messages |
2020-09-12 00:17:04 | Anthony Sottile | create | |
|