4 ms·
But where did you go? I've been dragged kicking and screaming into Python 3, (which I still hate), but I don't see any higher ground to swim too.
by Mizza 9y ago
But where did you go?
I've been dragged kicking and screaming into Python 3, (which I still hate), but I don't see any higher ground to swim too.
- dheera 9y agoCurious, what do you hate about Python 3, or is it just hating the migration process? (As someone who has to deal with a lot of Unicode content, I consider Python 3 a blessing, but curious.)
- convolvatron 9y agoi dont do a lot of python, and i think 3 is an improvement but for me the real nightmare is all of the libraries. some have 2 and 3 support, some only 2, some with a 3 fork thats not maintained, etc etc. every time i try to start a project using 3 i end up wasting a lot of time and going back to 2 anyways
- 52-6F-62 9y agoThis is my major confusion as well. It seems not worth it to begin work in an older version because debt is inherent right at the start, and updating code (for a new language version) is a personal peeve (or irritant). It's irrational, so don't ask, but I avoid it everywhere I can. Of course, diving into the newer version also adds a lot of debt, and possibly a total impasse, due to the lack of libraries that have made the update. I guess it will be quite some time before it becomes foolish to still cling to py2
- cthalupa 9y agoWhat libraries are unavailable in Python 3? This gets mentioned in every hacknews thread on this subject, but I honestly don't believe I've seen any that weren't either already updated to support Python 3, or didn't have alternatives that worked just as well. https://python3wos.appspot.com/ https://python3wos.appspot.com/ has a list of the largest packages in pypi, and there's very few that aren't available in Python3. httplib2 is easily replaced by requests. Supervisor isn't a library, it's an application. Same with carbon and graphite-web. Basically the only things on that list are the mozilla libraries, but IIRC some of those are in progress of being ported anyway. Twisted is one of the few I can think of that still isn't there, but most of the core APIs are there, as well as a lot of secondary stuff - half a year ago, more than 90% of the unit tests were passing on python3.
- 52-6F-62 9y agoI can't offer you any kind of solid case. My Python experience is admittedly limited. I've been working to get more into it lately. Thanks for the resource. Can I ask if you see any reason to not abandon Python 2 altogether when starting a new development project?
- cthalupa 9y agoIf you control the deployment environment, none that I can think of. If not, and you need to deploy to RHEL/Cent 7, then maybe. They're still on 2.7, though software collections will let you install 3.x on either of them.
- 52-6F-62 9y agoOh thanks for the tip. I work with CentOS regularly, but haven't worked on a Python project in that environment yet.
- convolvatron 9y agoidk, two sound libraries, an image processing library. i've moved some forward, its not that hard. still seems like a mess
- mrks_ 9y agoPersonally, I haven't found any must-have libraries for Python 2 only that don't have a satisfactory Python 3 alternative.
- dozzie 9y agoI, being a sysadmin, still consider Python 3 this new, shiny thing that is yet to become widely used. Linux distributions still use Python 2 code for their infrastructure, so Python 3 is something big I would need to specifically order to install that would give me negligible gains.
- cthalupa 9y agoThe Red Hat family of distros being decades behind isn't really an indication that things they aren't using are new and shiny. Plenty of modern distros ship Python 3 as the default Python, including Ubuntu. RHEL6 still uses Python2.6! It's horrid. I'm also a sysadmin, and not a programmer. But I do a lot of my automation scripting in python, and have worked on a few larger projects in python, including one that's requirements meant it had to be Python2/3 compatible. I am not a fan of Python prior to 2.7 at all, and I think 2.7 is really just a bunch of bandaids trying to pull together a pretty crappy language, whereas 3.x is a joy to work with.
- dozzie 9y ago> The Red Hat family of distros being decades behind isn't really an indication that things they aren't using are new and shiny. I talk about how a sysadmin perceives the state of Python, and a sysadmin usually works with stable OSes. And you know what? Most of the major distributions commonly used for servers use Python 2 as the default interpreter. The list of these distributions includes Red Hat/CentOS 7, Debian stable (Jessie) and soon-to-be-stable (Stretch), and Ubuntu 16.04 LTS. > Plenty of modern distros ship Python 3 as the default Python, including Ubuntu. RHEL6 still uses Python2.6! It's horrid. Erm... You compare "modern distros" with a release that is on its LTS? You know you're being unreasonable, right? Not to mention that Python 2.7 was released in 2010, the very same year as RHEL 6. It's hard to hold it against Red Hat having this in mind. And how Ubuntu ships Python 3 as the default version? From what I see, in Ubuntu Zesty (17.04, i.e. the most recent release) package "python" has version 2.7.13-2. > I am not a fan of Python prior to 2.7 at all, Because...? > [...] I think 2.7 is really just a bunch of bandaids trying to pull together a pretty crappy language, Like...? > [...] whereas 3.x is a joy to work with. Becuase, in contrast to 2.x, it has the feature of...?
- Mizza 9y agoI have a whole blog post/rant brewing about that topic, but on the whole, I just think it feels like it was designed by committee rather than a visionary. They've abandoned the common usage case in favor of the corner case. It also makes it much harder to teach. A few quick examples: Base64 encoding returns bytes. Why would anybody _ever_ want that? The whole purpose of B64 encoding is to make something string-safe. It's also now invalid to have this as a project structure: Name/name.py (with a Name class) in it. Which I would say is literally the most sensible common project structure to have. Now you have to call the file with the name class 'core' or 'main' or anything besides the actual description of what it is. Of course, you'll get no help from the errors if you hit this problem. "Dictionary view objects" are horribly unsemantic and annoying to teach. How is the language improved by having this no longer work `k = d.keys(); k.sort()`? Just give me a list. I'm maintaining a fairly large and popular Python 2/3 project and all of the errors are coming from the Python 3 side, and the maintainability of the project has been decimated by needing to support both versions. They should have just made a 2.8 with asyncio and unicode strings. My hope is that somebody will make a new language that does to Python what Python did to C/Java. For day-to-day scripting, let's get really serious about programmer ergonomics, semantics and maintainability above all.
- goatlover 9y agoThere are other scripting languages that have good support and strong communities. There doesn't need to be yet another programming language. Use Ruby, JS or PHP 7 instead. If it's scientific computing, Julia fills the niche very nicely. Or R.
- Mizza 9y agoMy point is that we should go a level "higher" than any current offering. Ex, why not let me do something like this out of the box: get https://api.github.com/users/Miserlou as miserlou print "My name is " miserlou.name Transparent/automatic web requests, content-type checking, serialization parsing, string formatting, network reference parsing, etc. Let the user be more specific if they need to, but design heavily around the most common use case.
- dilap 9y agoI've very happily replaced Python with Go (backend online services, misc command line tools).
- BuckRogers 9y agoTypeScript, and I'm absolutely loving it. So much of what I do is JS and this lets me do modern JS with many libraries and I get type safety. The only thing I can't accomplish with it, from local apps to webapps to mobile apps. I haven't used a better choice for goto language than TS. I completely understand your feeling though, I was in the same boat for a couple years till I tried TS. I also like Go and all the Python replacements. Definitely cheering on the exodus from Python3. The alternatives are all good stuff. I don't believe in 'one true god', and that god is definitely no longer Python. Py3 is a bloated mess of feature soup with no performance enhancements, they got so much wrong with it and is a case study in how to mismanage a language migration. I'd probably been onboard if they would've done a little better job. It seems the migration was for GvR and the rogue band of core devs (easier to maintain, their little pet project features) rather than the userbase that made Python what it is. They just did what was easiest for them and are pretty arrogant about it, saying they do the work so they decide. Ok, I'll use something else then with that attitude. The arguments for it are beyond silly and horribly uninformed, like "added support for unicode" is repeated ad nauseum.. I was using unicode with Python since 2.6. I can't tell if people really are that uninformed or lying to promote Python3. It was just already too big to do what they did and how they did it. But I'm not going to debate that with anyone, happily using TypeScript now and never looking back. It runs faster on V8 than Python ever will and I'm able to do almost everything you could do in plain JS with it. Which is a significant array of tasks. Otherwise, while I reach for TS first all the time now, thinking about getting into Rust for its C ABI and performance for a reusable library idea that I have. TS/Rust is a potent combo and covers an astonishing amount of ground (and does it well). Both of them are very practical.