Message 129112 - Python tracker (original) (raw)
We already have 3 places where a tuple is used:
socket.socket.bind socket.create_connection http.client.HTTPConnection
Changing this notation in smtplib for such a rarely used feature is not worth the effort, imo. Also, I would not add two new SMTP attributes. Passing a tuple to socket.create_connection() is just fine. If you want to know the source address afterwards you can use socket.getsockname().
PS - I modified smtplib.py in meantime. Please update your local copy.