diff options
author | jdemeyer <jdemeyer@cage.ugent.be> | 2018-04-13 12:22:46 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2018-04-13 12:22:46 (GMT) |
commit | 23ab5ee667a9b29014f6f7f01797c611f63ff743 (patch) | |
tree | 9e55defd8958fab8dad3a865d70447eca9633fc5 /Misc/NEWS.d/next/Library/2018-04-13-08-12-50.bpo-33265.KPQRk0.rst | |
parent | ffa2c3e2c40acae07aca5b77f2c0e8c14a00438d (diff) | |
download | cpython-23ab5ee667a9b29014f6f7f01797c611f63ff743.zip cpython-23ab5ee667a9b29014f6f7f01797c611f63ff743.tar.gz cpython-23ab5ee667a9b29014f6f7f01797c611f63ff743.tar.bz2 |
bpo-33265: use an actual method instead of a method-like function in ExitStack (GH-6456)
`MethodType` has the exact semantics that `ExitStack` needs,
so we can avoid creating a Python level closure.
Diffstat (limited to 'Misc/NEWS.d/next/Library/2018-04-13-08-12-50.bpo-33265.KPQRk0.rst')
-rw-r--r-- | Misc/NEWS.d/next/Library/2018-04-13-08-12-50.bpo-33265.KPQRk0.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2018-04-13-08-12-50.bpo-33265.KPQRk0.rst b/Misc/NEWS.d/next/Library/2018-04-13-08-12-50.bpo-33265.KPQRk0.rst new file mode 100644 index 0000000..523ceb9 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2018-04-13-08-12-50.bpo-33265.KPQRk0.rst @@ -0,0 +1,2 @@ +``contextlib.ExitStack`` and ``contextlib.AsyncExitStack`` now use a method +instead of a wrapper function for exit callbacks. |