Serhiy Storchaka <storchaka+cpyt...@gmail.com> added the comment:
> For the very specific case of os.environ.clear(), the C function clearenv() > could be used if available. It is bad in any way. The supposed example of using clear(): old_environ = dict(os.environ) os.environ.clear() os.environ.update(new_environ) ... os.environ.clear() os.environ.update(old_environ) Even if clear() passed, it will fail on attempt to restore the old environment, with the empty key. You can have the same issue in a corresponding C code. I think the only way is to report this as a bug in glibc and wait on their reaction. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue20658> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com