[issue33121] recv returning 0 on closed connection not documented

2018-07-25 Thread Tal Einat


Tal Einat  added the comment:

My guess would be the docs for socket.recv()[1], which indeed don't mention 
what the return value is after a socket has been closed, nor can I find that 
info elsewhere on that page.

Those docs for socket generally avoid going into detail, including specifically 
regarding returned values.  Apparently the approach is that this general note 
about the class explains where to look for more info:

"Socket objects have the following methods. Except for makefile(), these 
correspond to Unix system calls applicable to sockets."

Given this, I don't think adding this one small detail would be in line with 
the existing approach to documenting the socket class.


..[1]: https://docs.python.org/3/library/socket.html#socket.socket.recv

--
nosy: +taleinat

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33121] recv returning 0 on closed connection not documented

2018-03-23 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Please make a specific suggestion for a change in a specific location in the 
current online version of a particular doc -- the one you wish had been there 
already.

--
nosy: +terry.reedy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue33121] recv returning 0 on closed connection not documented

2018-03-22 Thread joders

New submission from joders :

The "Linux Programmer's Manual" states:

When a stream socket peer has performed an orderly shutdown, the return value 
will be 0 (the traditional "end-of-file" return).

I find that information pretty important which is why I am asking if you might 
want to add it to the python documentation as well. It would have prevented a 
bug in my code.

--
assignee: docs@python
components: Documentation
messages: 314260
nosy: docs@python, joders
priority: normal
severity: normal
status: open
title: recv returning 0 on closed connection not documented
type: enhancement
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com