Anthony Sottile <[email protected]> added the comment:
(I know this is old and closed but I've just run into the same thing with
pwd.getpwnam in issue41767)
KeyError: "getpwnam(): name not found: 'test'"
would it be possible / make sense to extend `KeyError` with a
named-only-argument which would preserve the raw string in this case?
something like (yeah the name is probably not great, I haven't had time to
think much about this)
raise KeyError("getpwnam(): name not found 'test'", preserve_msg=True)
----------
nosy: +Anthony Sottile
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue2651>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com