
If we use "read" and write as names. It means that often we end up writing code like this: os.write(our_pipe.write, data) os.read(our_pipe.read) Is that ok? I mean, it's not confusing that the os.read is a method, while pip.read is an attribute. Jonathan 2015-06-30 8:07 GMT+02:00 Cameron Simpson <cs@zip.com.au>:
On 30Jun2015 12:14, Chris Angelico <rosuav@gmail.com> wrote:
On Tue, Jun 30, 2015 at 12:10 PM, Ben Finney <ben+python@benfinney.id.au> wrote:
Steven D'Aprano <steve@pearwood.info> writes:
and I don't think there is any serious downside to using a namedtuple. A minor enhancement like this shouldn't require an extended discussion here on python-ideas.
+1, let's just get the standard names there as attributes of a namedtuple.
Except that this isn't about stdin/stdout - that just happens to make a neat mnemonic. This is about a pipe, which has a reading end and a writing end. If you pass one of those to another process to use as its stdout, you'll be reading from the reading end; calling it "stdin" would be confusing, since you're getting what the process wrote to stdout.
How about just "read" and "write"?
+1 for "read" and "write" for me. And -1 on "stdin" and "stdout" for the same reason as outlined above.
Cheers, Cameron Simpson <cs@zip.com.au>
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/