Live data from Hacker News

Python 3 in 2016

hynek.me

61–70 of 194 posts

Re: Python 3 in 2016

#61
post #10

Been thinking about learning to code, and a lot of people have recommended Python as a good language to begin with. Taking a look at this, should I be looking elsewhere?

It has nice features:

  - not large syntax
  - expressive overloaded keywords (in)
  - slice syntax that is easy on mind and eyes
  - nice set of builtin structure: lists, sets, dicts
  - with literals for all of them [], {}, {:}
  - lambda, generators, context
    (cute yet general way to ensure releasing resources, files, connections..)
But as all languages, you can lose yourself, learn and write shitty code in it. Find idioms, https://duckduckgo.com/?q=raymond+hettinger+python&ia=videos ps: I don't like it's oop syntax sometimes

That said, I never learned so much about one language than by learning another one. All paradigms have at least one gem to discover.

Re: Python 3 in 2016

#62
post #38
post #24

Earlier quoted context omitted.

Comments like this are so misguided and yet so common on HN. Adding a freaking JIT to CPython is a ridiculous suggestion that will never happen for a whole load of reasons. Getting rid of the GIL is more noble, but seems impossible to do without breaking compatibility. Python 4 will just be the next release after Python 3.9.

> Getting rid of the GIL is more noble, but seems impossible to do without breaking compatibility. > > Python 4 will just be the next release after Python 3.9. Really? Why even change the major version then, when there are no breaking changes? Given that many Python programmers seem to be traumatized by the last major version switch, why even bother? Or is this just for setting up Python 5 can have breaking changes i…

> Really? Why even change the major version then, when there are no breaking changes?

Python releases don't follow semver. If Linus can bump the kernel to 4.0 because he felt like it so can Python.

Re: Python 3 in 2016

#63
post #47

Earlier quoted context omitted.

>Sure, Go is easier to deploy Go's lack of a package manager making deployment more painful is the thing that made me come back to python.

Go is staticly linked, you don't need to deploy packages, just the binary.

But you have to build those with its dependencies. And the best thing Go came up with is vendorizing.

Re: Python 3 in 2016

#64
post #48

Earlier quoted context omitted.

> "it doesn't get rid of GIL and at the same time implement a JIT compiler, and at the same time remain 100% .py source-code compatible with Python 3." Guido could do that if he decided that Python 4 would be based on PyPy (AFAIK, many people thought Python 3 would be based on PyPy too). Compatibility isn't 100% but if it was the main platform I'm sure it'd improve even faster.

pypy still has the GIL.

Hopefully not for long: http://doc.pypy.org/en/latest/stm.html

Re: Python 3 in 2016

#65
post #14

Since everyone gives anecdotal proofs that Python 3 is just fine, I'll give mine as well. I've migrated to Python3 a rather big project (for the unicode handling) and although it was not quite easy, it'just fine now. I'm active in Qt, web, json, sql domains and I've never needed a library that is Python 2 only. Thus from my own point of view, the Python 3 ecosystem is just complete now. Super.

I think the biggest barrier to adoption right now is OS support. OSX still comes bundled with python2. There's no indication that Apple is working on a transition to 3. Ubuntu is actively working on the transition but the current LTS release (ie the one companies/enterprise will use) is still locked onto python2. The same can likely be said for other flavors of *nix. From a user's perspective, python3 has been ready…

Apple can't keep Python 2 up to date. If you are deploying a Python app on osx you unfortunately already have this problem.

Re: Python 3 in 2016

#66

I've done a lot of Python for many years and its all been Python 2. Python 3 seems to be a decent improvement, and if I was working on a Python 3 project, that would be fine. But when it comes to new projects, I struggle to find a compelling reason to use Python at all, when there are so many amazing languages now to choose from. With a new project you could choose Scala, Haskell, Clojure, Erlang (or Elixir) or Go. A…

For personal projects, you can pick whatever language you want, possibly the most fun one that is still practical. Haskell or Elixir look promising in this regard.

For companies, there are more factors to consider, eg. finding devs at a correct price, getting existing workforce to work on a new tech, size of standard/open source library, getting help and bugfixes from community instead of hacking on your own, risk of language/tech losing steam, etc. That's why several comparatively "boring" languages still thrive.

Re: Python 3 in 2016

#67
I started off python learning python 3, but a few months into it, I was forced do a project in python 2. It was a turning point, I immediately ported over all my python projects to python 2. To me, it just seemed more simple, elegant, and cleaner. It was the more pythonic version of python. And if I'm still working with python after 2020, I'll be using python 2.

Re: Python 3 in 2016

#68

I started off python learning python 3, but a few months into it, I was forced do a project in python 2. It was a turning point, I immediately ported over all my python projects to python 2. To me, it just seemed more simple, elegant, and cleaner. It was the more pythonic version of python. And if I'm still working with python after 2020, I'll be using python 2.

I don't understand this, what is more "pythonic" about 2?

Re: Python 3 in 2016

#70

It's quite possible that someone will come up with a good enough automatic 2->3 converter which alleviate the situation.

python-modernize[1] tries to automatically make your codebase compatible with both Python 2 and 3, using 2to3 and six[2] underneath. I haven't tried it yet, though.

[1] https://github.com/mitsuhiko/python-modernize

[2] https://pypi.python.org/pypi/six

Post reply on HN