← 返回首页
bpo-32604: Add support for a "default" arg in channel_recv(). by ericsnowcurrently · Pull Request #19770 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-32604: Add support for a "default" arg in channel_recv().#19770

Merged
miss-islington merged 3 commits into
python:masterfrom
ericsnowcurrently:channel-recv-default
Apr 28, 2020
Merged

bpo-32604: Add support for a "default" arg in channel_recv().#19770
miss-islington merged 3 commits into
python:masterfrom
ericsnowcurrently:channel-recv-default

Conversation

ericsnowcurrently commented Apr 28, 2020
edited by miss-islington
Loading

Copy link
Copy Markdown
Member

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.

https://bugs.python.org/issue32604

Automerge-Triggered-By: @ericsnowcurrently

nanjekyejoannah left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

Makes sense to me.

Comment thread Modules/_xxsubinterpretersmodule.c Outdated Show resolved Hide resolved

Copy link
Copy Markdown
Contributor

@ericsnowcurrently: Status check is done, and it's a success ✅ .

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Footer

© 2026 GitHub, Inc.