| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Don't implement os.unsetenv() in C using SetEnvironmentVariableW(name, NULL) anymore, but implement it in Python as os.putenv(name, ""). _wputenv() is preferred since it updates the CRT, whereas SetEnvironmentVariableW(name, NULL) does not. Replace also lambda functions with regular functions to get named functions, to ease debug.
Sorry, something went wrong.
| _unsetenv = unsetenv | ||
| except NameError: | ||
| _unsetenv = lambda key: _putenv(key, "") | ||
| if name == 'nt': |
There was a problem hiding this comment.
This looks too complicated and obscure. Many lines are duplicated with small differences. Would not it be easier to implement nt.unsetenv() on C?
Sorry, something went wrong.
|
@serhiy-storchaka: "This looks too complicated and obscure. Many lines are duplicated with small differences. Would not it be easier to implement nt.unsetenv() on C?" Ok, I wrote PR #18115 instead. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Don't implement os.unsetenv() in C using
SetEnvironmentVariableW(name, NULL) anymore, but implement it in
Python as os.putenv(name, ""). _wputenv() is preferred since it
updates the CRT, whereas SetEnvironmentVariableW(name, NULL) does
not.
Replace also lambda functions with regular functions to get named
functions, to ease debug.
https://bugs.python.org/issue39413