News for hackers. Stuff that matters.
Re:Grumpy: Go running Python by kj01a on Wednesday January 04, 2017 @10:37PM (#13324502)
So is it just a time issue, or are there compatibility reasons for why not all of you code is Python 3?

I ask because I started to learn to code with Python 2 because that's what was preloaded on my system. Is one over the other a big enough deal at a beginner level that I should switch to 3 now? How much of a learning curve am I in for?

Re:Grumpy: Go running Python by mastazi on Wednesday January 04, 2017 @11:02PM (#13324625)
> Is one over the other a big enough deal at a beginner level

No, at a beginner level it's not, there are many guides that explain the differences at a beginner level, and you can go through those in a few hours at most, for example http://python-future.org/compatible_idioms.html

But, if you start working now on a Python 2 project and that project starts growing significantly, then it will be hard to convert the codebase. That's why you can see people saying that they didn't switch yet, it's not that they don't know Python 3, it's that upgrading large legacy code bases is hard (not only in Python).

Re:Grumpy: Go running Python by wiz21c on Thursday January 05, 2017 @04:05AM (#13325791)
For me, the hardest part was migrating from Python 2 string to Python 3 Unicode string. But at the same time, this was a huge improvement for my code base because I work with several languages and unicode makes that much easier/safer. So it was a good thing.

Now the rest of upgrades were a bit painful (I was using some functional programming stuff, httprequest libraries, etc.)

Re:Grumpy: Go running Python by kj01a on Wednesday January 04, 2017 @11:20PM (#13324709)
Okay. Thank you for the advice.

My biggest program is like 100 lines of code maybe. So I will go ahead an switch now. But it's like 10pm where I'm at so here's hoping I don't play too much...

Re:Grumpy: Go running Python by cdelsolar on Tuesday January 10, 2017 @01:56PM (#13367755)
Just a time issue. I don't believe the learning curve is that big, most of it would be in how you deal with strings and the `print` statement, which isn't that heavily used in web apps.
Re:Grumpy: Go running Python by johnny22 on Wednesday January 04, 2017 @11:29PM (#13324745)
what system is that? a mac? If so , the sadly you do have to get py3 yourself. If a Linux distro, then you likely already have python 3 preinstalled. `/usr/bin/python` won't point to python3 in anytime in the near future.
Re:Grumpy: Go running Python by kj01a on Thursday January 05, 2017 @09:13AM (#13327189)
Haha it's Ubuntu. After I downloaded Python 3.6 last night, I found out I had Python 3.4 already on my machine. I got excited about new software and forgot to check. It's a crutch :/