Skip to content

Conversation

dandavison
Copy link
Contributor

Fix the return type, and improve the comments inherited from Python a bit more.

@dandavison dandavison requested a review from a team as a code owner September 24, 2024 21:46
raise TypeError(f"Expect an iterable of Tasks/Futures, not {type(fs).__name__}")
if not fs:
raise ValueError("Set of Tasks/Futures is empty.")
raise ValueError("Sequence of Tasks/Futures must not be empty.")
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This check doesn't actually make sense, since the input could be an empty generator, which is truthy, but will become empty when materialized as a list below. Leaving for now since this is copied from cPython.

Copy link
Member

Choose a reason for hiding this comment

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

👍 If they Python authors were better, it'd be below fs = list(fs) heh

@dandavison dandavison enabled auto-merge (squash) September 25, 2024 13:10
@dandavison dandavison merged commit c3426ce into main Sep 4, 2025
13 of 17 checks passed
@dandavison dandavison deleted the fix-wait-type branch September 4, 2025 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants