bpo-20104: Improve error handling and fix a reference leak in os.posix_spawn(). by serhiy-storchaka · Pull Request #6332 · python/cpython (original) (raw)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docstring says that it should a tuple or a list, and other similar APIs accept only tuples and lists. If there is a need of supporting other sequences, it is better to implement this feature consistently for all APIs and in a separate issue.
Actually accepting arbitrary sequences can have negative consequences. str
and bytes
are sequences, and passing them by mistake will cause raising errors with unhelpful messages.