Message 336051 - Python tracker

Message336051

Author matrixise
Recipients Windson Yang, matrixise, xuancong84
Date 2019-02-20.09:26:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550654797.93.0.697666787042.issue36047@roundup.psfhosted.org>
In-reply-to
Content
I confirm that you don't use socket.makefile in write mode.

Python 3.7.2 (default, Jan 16 2019, 19:49:22) 
[GCC 8.2.1 20181215 (Red Hat 8.2.1-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> s = socket.socket()
>>> s.connect('localhost', 5432)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: connect() takes exactly one argument (2 given)
>>> s.connect(('localhost', 5432))
>>> S = s.makefile()
>>> print('hello world', file=S, flush=True)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
io.UnsupportedOperation: not writable
>>> S = s.makefile(mode='w')
>>> print('hello world', file=S, flush=True)
>>> 

I close the issue.
History
Date User Action Args
2019-02-20 09:26:37matrixisesetrecipients: + matrixise, xuancong84, Windson Yang
2019-02-20 09:26:37matrixisesetmessageid: <1550654797.93.0.697666787042.issue36047@roundup.psfhosted.org>
2019-02-20 09:26:37matrixiselinkissue36047 messages
2019-02-20 09:26:37matrixisecreate