Author beliaev-maksim
Recipients Anthony Sottile, CAM-Gerlach, Nils Kattenbeck, beliaev-maksim, epicfaace, georg.brandl, maurosr, ncoghlan, nyuszika7h, pitrou, r.david.murray, serhiy.storchaka
Date 2021-11-02.10:35:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635849339.11.0.893485615614.issue25024@roundup.psfhosted.org>
In-reply-to
Content
just want to correct code that Nils post in the last comment to really take args and kwargs

~~~
def mkdtemp_persistent(*args, persistent=True, **kwargs):
    if persistent:
        @contextmanager
        def normal_mkdtemp():
            yield tempfile.mkdtemp(*args, **kwargs)
        return normal_mkdtemp()
    else:
        return tempfile.TemporaryDirectory(*args, **kwargs)

with mkdtemp_persistent(persistent=False) as dir:
    ...
~~~
History
Date User Action Args
2021-11-02 10:35:39beliaev-maksimsetrecipients: + beliaev-maksim, georg.brandl, ncoghlan, pitrou, r.david.murray, serhiy.storchaka, maurosr, Anthony Sottile, epicfaace, CAM-Gerlach, Nils Kattenbeck, nyuszika7h
2021-11-02 10:35:39beliaev-maksimsetmessageid: <1635849339.11.0.893485615614.issue25024@roundup.psfhosted.org>
2021-11-02 10:35:39beliaev-maksimlinkissue25024 messages
2021-11-02 10:35:39beliaev-maksimcreate