STINNER Victor added the comment: "An environment variable is an easy way to make sure that all subprocesses also have assert dialogs disabled. In release builds they are always disabled, hence the _DEBUG check."
If _PyVerify_fd() must go, I would prefer to always disable CRT check. Otherwise, os.dup(<invalid fd>) would open the CRT assertion popup, instead of raising OSError(EBADF). I prefer to have the same behaviour with any version of the CRT and any version of the Visual Studio. You may add an environment variable to explicitly *enable* the check, if you want. Programming with Python is different than programming with C. Python always raise an OSError(EBADF) exception. It's not like the C language, where you have to explicitly check the result of each function call. It's difficult to ignore OSError without notifying it. I don't know other CRT checks. Many other checks make sense for Python too? ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23314> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com