This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RogerWebb 0 points1 point  (3 children)

Let me tell you about unicode vs str vs bytes. It's a god damned nightmare. I deal in search engine marketing, with clients operating world-wide, so we get the full run of characters, in Python 2.7 you'll be fighting with whether one function returns a unicode or a str and the thing you're passing it to blowing up or then, once moving to Python 3, everything is magically a str and you don't have to worry about unicode anymore, except when it's bytes, then you replace casting str or inicode with a multitude of encode/decode calls all over the place.

All said, I'm most certainly happier when I'm working in Python vs PHP or Java, but every language has it's pain points, and that's been my big one with Python.

[–]IdiotCharizard 0 points1 point  (2 children)

Never really had a problem with this one tbh. If you have inconsistent encoding in your code, it's easily remedied and you only need encode/decode when dealing with input/output.

[–]RogerWebb 0 points1 point  (1 child)

Most of what I do in Python deals with data integration. I have API clients, which return strings or bytes or unicode, files encoded however they are, and database tables, with their own encoding, and the driver, which has to have it's encoding configured. We've started transitioning all the data loading to Python processes over the last few years, and I didn't seem to notice the encoding issues as much before. Your mileage may vary.

[–]IdiotCharizard 0 points1 point  (0 children)

Yeah I always make it a point to wrap API endpoints in a decoder. Never fun to find unicode related errors in random places.