Re: Why not have a recvall method?

2018-02-04 Thread
Thank you, it's very helpful. I think the recvall should builtin to the _socket module like sendall. -- Original -- From: "Dan Stromberg"; Date: Mon, Feb 5, 2018 06:01 AM To: "陶青云"; Cc: "python-list"; Subject: Re: Why

Re: Why not have a recvall method?

2018-02-04 Thread
is reached first). -- Original -- From: "Steven D'Aprano"; Date: Sun, Feb 4, 2018 09:31 PM To: "python-list"; Subject: Re: Why not have a recvall method? On Sun, 04 Feb 2018 19:26:36 +0800, 陶青云 wrote: > Hello, allThe socket objec

Why not have a recvall method?

2018-02-04 Thread
Hello, all The socket object has a `sendall` method that can send all bytes you specified. Oppositely, socket only has a recv method. I wonder why there is not a `recvall` method? To workaround this, I use `f = socket.makefile('rb')`, then all `f.read(n)` Thanks. -- https://mail.python.or

Why not have a recvall method?

2018-02-04 Thread
Hello, allThe socket object has a `sendall` method that can send all bytes you specified. Oppositely, socket only has a recv method. I wonder why there is not a `recvall` method? To workaround this, I use `f = socket.makefile('rb')`, then `call f.read(n)` Thanks. -- https://mail.python.org/mailma