This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author yselivanov
Recipients yselivanov
Date 2017-12-19.14:23:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1513693404.23.0.213398074469.issue32373@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017-12-19 14:23:24yselivanovsetrecipients: + yselivanov
2017-12-19 14:23:24yselivanovsetmessageid: <1513693404.23.0.213398074469.issue32373@psf.upfronthosting.co.za>
2017-12-19 14:23:24yselivanovlinkissue32373 messages
2017-12-19 14:23:24yselivanovcreate