[Python-Dev] PEP 433: second try

Victor Stinner victor.stinner at gmail.com
Wed Jan 30 09:45:06 CET 2013


2013/1/30 Larry Hastings <larry at hastings.org>:
> Here is a new version of my PEP 433.
> [...]
>  * ``os.get_cloexec(fd)``
>  * ``os.set_cloexec(fd, cloexec=True)``
>  * ``sys.getdefaultcloexec()``
>  * ``sys.setdefaultcloexec(cloexec=True)``
>
> Passing no judgment on the PEP otherwise, just a single observation: the
> "cloexec" parameter to "sys.setdefaultcloexec" should not have a default.

Oh, it's a mistake: sys.setdefaultcloexec() has one parameter and it
is mandatory:
sys.setdefaultcloexec(cloexec)

Victor


More information about the Python-Dev mailing list