Closed ketor closed 7 years ago
@ianva Please review. Thanks!
I'm afraid, I can't merge this code because it‘s unmaintainable.
You can create a util method like superEncode
, it encapsulate difference between python2 and python3, and then superEncode
is used to replace String.encode
of original code.
@ianva Refactored the py2/py3 compatibility code now. Please review. Thanks!
Add 4 new methods: str_encode
, str_decode
, bytes_decode
, url_quote
.
Now all py2/py3 compatibility processing is in these methods, so the main code logic is clear.
Tested on my mac with vim(+python) and MacVim(+python3).
Signed-off-by: KetorD d.ketor@gmail.com
Fix #15