Live data from Hacker News

Python 3 in 2016

hynek.me

51–60 of 194 posts

Re: Python 3 in 2016

#51
post #50

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.

There is also pyston, which is a 'competing' LLVM backed JIT that Dropbox is working on. Guido also happens to be working at Dropbox, but I don't know if he's directly involved with pyston or not. AFAIK, many people thought Python 3 would be based on PyPy too Don't think so. Some people hoped that Python 3 might be based on Unladen Swallow, which was a different Python JIT that Guido was working on while at Google, b…

Why do people always give a single person all the credit? I don't think Guido was ever really involved in Unladen Swallow or that he has any particular interest in JIT compilers.

Re: Python 3 in 2016

#52
post #15

We are using Python LDAP library[1] at work, but it is not available for Python 3 yet. Is there an alternative? 1 https://pypi.python.org/pypi/python-ldap/

I can second the recommendation for ldap3. It's very well-engineered, well-documented, works with python 2 and 3, and has (if I remember correctly) zero dependencies.

Re: Python 3 in 2016

#53
post #50

Earlier quoted context omitted.

There is also pyston, which is a 'competing' LLVM backed JIT that Dropbox is working on. Guido also happens to be working at Dropbox, but I don't know if he's directly involved with pyston or not. AFAIK, many people thought Python 3 would be based on PyPy too Don't think so. Some people hoped that Python 3 might be based on Unladen Swallow, which was a different Python JIT that Guido was working on while at Google, b…

Why do people always give a single person all the credit? I don't think Guido was ever really involved in Unladen Swallow or that he has any particular interest in JIT compilers.

I don't think I gave him all the credit. We where talking about Guido and I mentioned a relevant project I thought (perhaps erroneously) that used to work on.

Re: Python 3 in 2016

#54

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

There are converters, and it's not too difficult to even write code that runs in both Python 2 and 3.

The main roadblock in upgrades is unicode text vs bytes handling.

Python2 was lax about using bytes for text. You could do unicode and bytes properly if you really tried hard enough, but it took a conscious effort. So most people just used bytes for text, and hoped for the best (if the data is ASCII or UTF-8, it will work most of the time).

Python3 is strict about the text vs bytes separation. Patching this into a program afterwards is a lot of work.

But if your Python2 program already does unicode carefully in Python2 (unicode type internally everywhere, from __future__ import unicode_literals, explicit encode/decode when talking to external APIs), then you are 90% done with the upgrade to Python3.

Re: Python 3 in 2016

#55
post #32

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…

I often dabble in other languages but in the end always return to python (3). What it offers for me truly is the batteries included and easy, memorable and predictable syntax. (Probably due to experience). Sure, Go is easier to deploy, Erlang and by extension Elixir are easier to scale. But python does align very well with my personal though process. I don't think parallel and I don't have race conditions in my mind.…

> But python does align very well with my personal though process.

TBH, that's the most rational reason ever for choosing any language. Anything else is much less important.

But, yes, for me the experience is the opposite, Python flies in the face of my thought process in every single aspect of it. I find it limiting, inflexible and dominating. Which means, everyone think differently, and there is no single language that suits all possible combinations of problem domains and thinking styles.

Re: Python 3 in 2016

#56
post #31

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…

Noob question: What's so difficult about deploying/distributing python?

https://glyph.twistedmatrix.com/2015/09/software-you-can-use...

Re: Python 3 in 2016

#57
This is the ultimate HN circlejerk comment

>Scala, Haskell, Clojure, Erlang (or Elixir) or Go. And there's also the less popular ones like Haxe and Dart

Are you kidding me? Did you just list the languages you see threads on HN about? Scala and Go I could maybe understand if you needed the performance but the rest of the choices are just bad. Especially if you are trying to start a business instead of a functional programming bootcamp.

Also there is nothing inherently more difficult about deploying and distributing python compared to any of the languages you chose.

Re: Python 3 in 2016

#58
post #40

Earlier quoted context omitted.

I suspect that many Pythoners will install Python3 (with homebrew) or other on OSX (and whatever other platforms still come with just Python2)

I would recommend to even use pyenv ( https://github.com/yyuu/pyenv ) that will allow you to install any Python version in your home directory (i.e. not fucking up your system installation). If you maintain many FOSS libs like I do, together with tox it's priceless.

Homebrew installs software into /usr/local last time I checked so unless you are doing something really strange like manually overwriting system files, you'll be hard pressed to fuck up the whole system. Personally I'd install homebrew into /opt/homebrew.

Re: Python 3 in 2016

#59

Earlier quoted context omitted.

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…

I suspect that many Pythoners will install Python3 (with homebrew) or other on OSX (and whatever other platforms still come with just Python2)

Yes but when you want to distribute a program at the end of the day, you don't want to have to bundle python with every release or ask the use to install it, which makes a lot of people choose python 2 since it is ubiquitous.

Re: Python 3 in 2016

#60
post #44

Earlier quoted context omitted.

I never thought I'd say it, but I'm loving programming the new ES2105 version of JavaScript. It really has a great deal in common with Python now. Clearly many programming languages are converging as they implement common good ideas from other programming languages. That's going to mean that whilst Python might have distinguished itself in the past for being streets ahead, in the future it's likely that many language…

The "all async" model of Node kills it for practical programming compared to Python... And the worst thing is, Node/v8's JIT would kill Python in performance for a;; the kind of things people write Python scripts for, even if it run all synchronous. It would be nice if callbacks/promises/async-await were only optional and for network/web things, not for everything.

async/await isn't too bad (es7 via babel)
Post reply on HN