Pranav Devarakonda <devarakondapra...@yahoo.com> added the comment:

Thanks for taking time and updating this, Karthikeyan Singaravelan. I do agree 
that there there is no proper way to find out if an object is of type socket or 
not. 

However other fixers in lib2to3 are not any different. For example the 
fix_dict.py changes every instance of viewkeys() method to keys() irrespective 
of the type of the object. And I guess that applies to all other fixers in 
lib2to3 as well. So that convinced me that a fix for this can also be 
accommodated.

A compromise that we could foster, as I already mentioned is to make this fix 
explicit so users can use this only if they need it. Please find attached the 
fixer I wrote. I haven't made a PR yet.

----------
Added file: https://bugs.python.org/file47850/fix_socket_send_recv.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue34893>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to