Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

> I have tweaked that fixer to handle the pointed cases 
> and a few additional ones too

Playing whack-a-mole with a few cases will always fall short of being able to 
guarantee correct transformations and not break existing code that is working 
correctly.

One possibility is to add a type check to the generated code, "send(x)" -> 
send(x.encode() if type(x)==bytes else x)" but this has its own issues and 
isn't satisfying.

----------

_______________________________________
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