New submission from Robert Tasarz: Minimal example:
>>> import os >>> somekey = 'random' >>> try: ... os.environ[somekey] ... except KeyError as e: ... print(repr(e)) ... somekey == e.args[0] ... KeyError(b'random',) False Tested in Python 3.3.1 on Debian ---------- components: Extension Modules messages: 186604 nosy: Robert.Tasarz priority: normal severity: normal status: open title: os.environ converts key type from string to bytes in KeyError exception versions: Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue17702> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com