STINNER Victor added the comment: > For total cleanness maybe the constructor should raise a TypeError if > server_hostname is passes as a bytes.
Oh. So there are two attributes? SSLSocket.server_hostname and SSLSocket._sslobj.server_hostname? The constructor should make sure that both are consistent (ex: initialize SSLSocket.server_hostname from sslobj.server_hostname), or SSLSocket.server_hostname should be a property reading SSLSocket._sslobj.server_hostname (or a getter/setter if we should be able to modify it). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22564> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com