[Python-ideas] Make os.pipe() return a namedtuple.

Cameron Simpson cs at zip.com.au
Tue Jun 30 02:12:42 CEST 2015

On 29Jun2015 16:51, Jonathan Slenders <jonathan at slenders.be> wrote:
>Could we do that? Is there is reason it's not already a namedtuple?
>I always forget what the read-end and what the write-end of the pipe is,
>and I use it quite regularly.

The ordering is the same as for the default process file descriptors. A normal 
process has stdin as fd 0 and stdout as fd 1. So the return from pipe() has the 
read end as index 0 and the write end as fd 1.

Cameron Simpson <cs at zip.com.au>

More information about the Python-ideas mailing list