Message 129153 - Python tracker (original) (raw)
There's no need to store the source address as an instance attribute. Just pass it as-is to socket.create_connection() in init and connect methods and then get rid of it.
Ok, what if user initialize with something like smtplib.SMTP(source_address=('200.165.12.1', 25)) and calls connect without source_address?