7 ms·
On the other hand, if you are comfortable with Python 2, it will do the job, and you know it will be supported for a foreseeable future, why bother learning Pyt
by a1a 12y ago
On the other hand, if you are comfortable with Python 2, it will do the job, and you know it will be supported for a foreseeable future, why bother learning Python 3?
I assume there is a good answer for switching to Python 3, but I honestly don't know (haven't bothered to do any research though).
Harshly put: I care about getting my python script working as soon as possible and for a foreseeable future - I couldn't care less for the Python language and it's future.
- pfraze 12y agoThat's not a valid reason to avoid making the switch. A big backlog of code that you can't afford to port is valid; it's a business issue. But you? This is a tool of your trade, just do the research.
- a1a 12y ago"Tool of your trade": I have no use of python 3, nor do I have any use for Scala, Perl, or whatever. These could all be considered "tools of my trade". I rarely write anything high language besides small scripts. Python 2 does the job. If I ever were to need functionality of another language, great, it's fun to learn something new. Our time is limited and we must prioritize. Sadly we cannot invest time to learn everything (well I guess it's possible, but I rather be awesome in four languages than mediocre in twenty).
- dragonwriter 12y ago> I have no use of python 3 You admit you haven't done any research, so you clearly don't have any basis for making that statement.
- a1a 12y agoNor have I done research on Perl, Scala, etc. Your missing my point. I am successfully getting my things done in Python 2. I do not have any use for Python 3, Perl, Scala, or any other language. I might have in the future, and hey, some language might be better suited to solve the problem - but as long as it's not drastically better the sensible tradeoff is to stick with Python 2.
- goostavos 12y agoThat philosophy sounds like one that will cause you to wake up one day and realize your skill set is massively out if date. Python 3, scala, and pearl all give you new ways of solving a problem. You're missing out on a lot of super cool stuff by not exploring! Outside of maybe library support, I see no reason to not to at least check out python 3.
- a1a 12y agoFair point. But I'd like to quote my own post above: >I rarely write anything high language besides small scripts. Python 2 does the job. If I ever were to need >functionality of another language, great, it's fun to learn something new. Our time is limited and we must >prioritize. Sadly we cannot invest time to learn everything (well I guess it's possible, but I rather be >awesome in four languages than mediocre in twenty).
- knappe 12y agoSo much for having a big toolbox with lots of different hammers available to you.
- a1a 12y agoI do have a big toolbox, it contains all kinds of screwdrivers etc for low level programming. But I only need one hammer for the few problems I face that is best solved by scripting languages.
- 6d0debc071 12y agoTo be fair, most of the people I see with sheds with a load of tools in them don't make much and wouldn't know where to begin if they suddenly had to. It's the appearance of the thing that they love.
- chc 12y agoI'll let you in on a secret: Python 3 is Python, just with a couple of improvements. Painting it as an entirely new language like Perl or Scala reminds me of people I used to support who thought their entire computer was different if I gave them a monitor with a different-colored rim. You're making a mountain out of a molehill.
- kazagistar 12y agoIt will take you an hour at most to read up on all the significant changes in Python 3. Its not like learning Scala or Perl at all. It just cuts some things that have been depreciated for years, makes everything more consistently iterable, adds some nice new comprehensions and literals, modifies certain bits of metaprogramming, and a few other smaller changes. The hardest thing for me was remembering that print is a function in 3, and needs parens.
- pfraze 12y ago@a1a I apologize, I was a jerk yesterday. I definitely dropped my forum manners. Not ok! Just so you do know what the story is with python3: It's mostly a move to proper unicode support (which couldn't be done without breaking backwards compat) but it's a relatively minor change for most code. You'll definitely run into some library support issues, but they should be few and getting fewer. It shouldn't be terrible, and I'd encourage you to do it just for the sake of Guido and the python community, because this transition has been a bit of a burden for them.
- melling 12y agoWell, the one big reason was that you were going to lose support for Python 2. Guido just took that reason away and now tens of thousands of new Python apps are going to be written in Python 2 because they've got another 6 years to worry about it. Guido just created a bigger problem. No good deed goes unpunished.
- Pacabel 12y agoWhere exactly do you get this "tens of thousands" number from?
- coldtea 12y agoFrom the number of Python programmers out there and the percentage using Python 2. In fact there'd be "tens of thousands" websites made with Python alone (Django et al), so the number of apps in total will be much higher. Heck, people doing scientific Python are more than 10.000, and they write more than one new apps for their research every year.
- Pacabel 12y agoOh, I see. Some people here misinterpreted what I wrote to suggest that Python isn't widely used. Clearly that's not what I meant. I just dislike how melling basically pulled a number out of his ass, and then used it as "evidence" to back up his claims. I wouldn't even consider it a low-quality estimate, since he doesn't even try to justify or explain how that number was obtained. In this case, "tens of thousands" could very well really be "hundreds of thousands". It could be significantly less, too. Regardless, it's purely speculative. Using such made up numbers makes his argument weaker than perhaps not using any such value at all.
- melling 12y agoNo, I picked what I thought would be a lower bound. Do you think it will only be a few hundred or few thousand over 6 years? Python is an extremely popular language.
- raverbashing 12y ago" why bother learning Python 3?" Unicode And of course, you'll move from a platform that's shutting down to one that's evolving Really, it's worth it.
- goostavos 12y agoNot to mention `yield from`, which is awesome. Iterators everywhere is a powerful tool.
- adamors 12y agoIt's hardly shutting down if the support will last another 6 years ...
- raverbashing 12y agoIf you prefer to work with a platform that will get only bugfixes/security updates go ahead Potentially no new libraries (for new things and/or API connections) Not sure how long new versions of existing libraries will keep 2.7 support.
- BuckRogers 12y agoNo new libraries? I wonder if 2014's new Python implementation from Guido's employer Dropbox- Pyston, count as significant in your mind? If you prefer to have no Google App Engine, Azure, Amazon or distro support other than Arch, then have at it. I'll keep that and PyPy, Pyston, Jython, IronPython, PyInstaller, not to mention all programs where Python is integrated like GIMP, all of this is Python2 only. Enjoy your Python3. I'll stick with Python.
- ubernostrum 12y agoWell, if you were and are staying on Python 2.7, you are committing to anywhere from 6 (if you start now) to 10 (if you started day of 2.7.0 release) years of a frozen, non-evolving language. No new features, no improvements, nothing -- just the same language, for a decade. If you can live with that, then by all means stick to 2.7 until your Red Hat support contract expires. If not, consider switching to 3.x.
- wisty 12y agoIf you're going to build up a large code base, you don't want to have to port it when the libraries you need stop supporting Python 2.
- sho_hn 12y ago> On the other hand, if you are comfortable with Python 2, it will do the job, and you know it will be supported for a foreseeable future, why bother learning Python 3? This bothers/worries me, because I don't understand where this notion that "learning Python 3" requires significant effort or commitment comes from. Python 3 isn't massively different from Python 2. I learn more "new stuff" (APIs I've never used before, implementation details of systems I work on/with, etc.) basically every month than that difference. Python 2 -> 3 can be a big step because of dependencies. The difference between the languages themselves is negligible (and yet, IMHO for the better). You don't need to learn any new ways of thinking here. If you're comfortable with Python 2, you're comfortable with Python 3 as well. If your dep ducks are in a row and you're writing new code, it's an obvious choice.
- sillysaurus3 12y agoIt's not about the language. Languages are easy to learn. I can learn one between breakfast and lunch and be productive by dinnertime. I use Python 2 because of the massive ecosystem of libraries that have been written, work, and will continue to work. It's shortsighted and more than a little irresponsible to shame or muscle people into switching. Code that works is valuable. Code that has been tested for a decade is valuable. What's not valuable is forcing an upgrade to a platform that nobody wants to upgrade to while forcing us to abandon third-party code with years of field testing that the authors aren't ever going to port to python 3.
- weixiyen 12y ago^ This is the best comment in the entire thread. Nobody who's making anything that actually matters and delivers value to customers cares about the improvements in the language itself as much as they care about the battle-tested libraries that come with that particular language. If you are a company that actually matters (has significant growth / users) and you use Python3 over Python2 as the main language in your stack, I'd like to know who you are, if you even exist.
- clamberson 12y ago
- pekk 12y agoPython 3 will do the job, what is your argument against it?
- collyw 12y agoI could have taken that attitude with Django 3 years ago, but they released a new version a week or so after I started using it. That was a simple upgrade, no problems (1.2 - 1.3). I try to stay up to date now, as it keeps many things relevant. Sometimes it causes a bit of hassle. Now If I had stayed on 1.2, then many of the extra libraries I am using or looking at these days would not be compatible. (Now sometimes I want to use older libraries that have not been kept up to date, but the more popular packages which gain traction - the "more important ones" tend to keep up to date or replaced by ones that do). A language is different from a framework, but I assume once enough traction is gained, then the same thing will happen with Python - popular packages will end up up on Python 3 only. There seems to be a fair bit of 'push' from the community for people to move to Python 3, with comments of "why not change already".