]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-32604: Add support for a "default" arg in channel_recv(). (GH-19770)
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 28 Apr 2020 23:11:32 +0000 (17:11 -0600)
committerGitHub <noreply@github.com>
Tue, 28 Apr 2020 23:11:32 +0000 (16:11 -0700)
commit5e8c691594d68925213d36296ce7c4b3e90bcb1d
tree1b93ee2c24dd9944396aa98ba232f0db4e2893c1
parent6d86a2331e6b64a2ae80c1a21f81baa5a71ac594
bpo-32604: Add support for a "default" arg in channel_recv(). (GH-19770)

This allows the caller to avoid creation of an exception when the channel is empty (just like `dict.get()` works).  `ChannelEmptyError` is still raised if no default is provided.

Automerge-Triggered-By: @ericsnowcurrently
Lib/test/test__xxsubinterpreters.py
Modules/_xxsubinterpretersmodule.c