New submission from David Gene <da...@astrosticks.com>:
Using os.environ[KEY] with a non-existent environment variable key only gives a simple KeyError, which may be fine for a developer to understand, but if a user of a Python program were to come across it, it may not indicate what they needed to do to avoid the crash. I would raising the keyError with a message such as "Environment variable '{}' not set". ---------- messages: 394735 nosy: astrosticks priority: normal pull_requests: 25047 severity: normal status: open title: Add descriptive error message when environment variable not detected type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44264> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com