Hacker News new | past | comments | ask | show | jobs | submit login

Okay please debug my py2 -> py3 migration bytes vs strings code with no type annotations.

Aaaahg it burns. I basically am going through and first annotating, then upgrading.




Ahaha I've had the exact same issue recently, fortunately it was only in a few spots. Fair enough.

Interestingly enough, py2 was smart enough to automatically load things in the correct format. Loading a binary file? Get bytes. Loading a text file? Get a string. Py3 has worse functionality now, all for the sake of consistency.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: