[New-bugs-announce] [issue32373] Add socket.getblocking() method
Yury Selivanov
report at bugs.python.org
Tue Dec 19 09:23:24 EST 2017
New submission from Yury Selivanov <yselivanov at gmail.com>:
Currently we have the following methods:
* socket.settimeout(t) -- can set the socket in blocking mode, when t==0.
* socket.setblocking(flag) -- sets in blocking or non-blocking mode.
* socket.gettimeout() -- returns 0 when socket is in non-blocking mode.
socket.gettimeout() is the only easy way of checking if the socket is non-blocking or blocking, but it's not intuitive to use it. It's especially strange that we have a setblocking() method without a corresponding getblocking().
I propose to add a 'socket.getblocking() -> bool' method.
----------
assignee: yselivanov
components: Library (Lib)
messages: 308645
nosy: yselivanov
priority: normal
severity: normal
status: open
title: Add socket.getblocking() method
type: enhancement
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32373>
_______________________________________
More information about the New-bugs-announce
mailing list