Live data from Hacker News

Most popular Python packages now support Python 3

py3readiness.org

91–100 of 166 posts

Re: Most popular Python packages now support Python 3

#91
post #90
post #87

Earlier quoted context omitted.

Ouch! type Strings map[string]stdext.Unit […] func (a Strings) Intersection(b Strings) Strings { result := NewStrings() for as, _ := range a { for bs, _ := range b { if as == bs { result.Add(as) break } } } return result }

Ick, good point. Since the fake set is a map, that should use key lookup?

Yes. Basically:

  for k := range s1 {
    if s2.Contains(k) {
      result.Add(k)
    }
  }

Re: Most popular Python packages now support Python 3

#92
It's great that finally the popular packages are pretty much all supported.

But the question is, is that really the problem? It's a bit like Microsoft Word: so many alternative word processors implement all the popular features. So what's the problem? The problem is, nearly everybody has some obscure feature they depend on. So even if an alternative has all the popular features, still almost nobody can use it. I think the constant referral to how many "popular" packages support python3 leads to a bit of false sense of optimism in the python world: it's perfectly possible to support all the popular packages with Python 3 and yet have it be unusable for a large percentage of users.

Re: Most popular Python packages now support Python 3

#93
post #92

It's great that finally the popular packages are pretty much all supported. But the question is, is that really the problem? It's a bit like Microsoft Word: so many alternative word processors implement all the popular features. So what's the problem? The problem is, nearly everybody has some obscure feature they depend on. So even if an alternative has all the popular features, still almost nobody can use it. I thin…

I was burned by that problem two years ago, but I tried again recently and absolutely everything was supported. Heck, it's starting to be the case that py2 is not supported anymore..

Re: Most popular Python packages now support Python 3

#94

Python 3 killed Python? Feels like the Perl story again, lack of backwards compatibility or "next version will be perfect" killed the language. And people still complain about Java, C# and others being too slow to deprecate old apis.

Python is very much alive. Not sure where you’re getting that. Perl 6 and Python 3 aren’t really remotely comparable, either.

Re: Most popular Python packages now support Python 3

#95
post #30

Python 3 is a case study on how you should never create a new version of a language implementation that can't load and interface with code written for the old version. After almost 10 years, the old version is still in use, and the new version isn't even that much better.

Python 2 is still in active use, but Python 3 has come a long way and gotten a lot better since it first came out in 2008.

If py3 never happened, then py2 would have also have evolved at an equal pace. Nobody can accurately calculate missed opportunity cost, but "almost there, everyone please use py3 now, its not a problem anymore" after 10 years is as high as it gets.

Re: Most popular Python packages now support Python 3

#96
post #24
post #12

Earlier quoted context omitted.

As much as a I like Go in general, there are two pythonic things that, IMO, really should go into the next major revision. 1: sets; in this day and age, not having sets as native, stdlib-provided data types is simply unacceptable.[ß] 2: The ease of python's "in" keyword; being able to test for a key in a map (or set!) without any indirection is crucial ß: granted, IIRC python moved sets into native stdlib types only…

Sets don't need to be native in languages that are both fast and have a proper type system. For example, rust and OCaml have a standard set in their stdlib, but it's not builtin. Of course, go lacking generics makes it impossible to implement a decent set type in it.

Set literals are nifty. If they're in stdlib rather than built-in, they can't be literal syntax.

Re: Most popular Python packages now support Python 3

#97
post #87
post #47

Earlier quoted context omitted.

This repository was named to emphasise the comedy of its existence :) https://github.com/frou/poor-mans-generics/

Ouch! type Strings map[string]stdext.Unit […] func (a Strings) Intersection(b Strings) Strings { result := NewStrings() for as, _ := range a { for bs, _ := range b { if as == bs { result.Add(as) break } } } return result }

Reminded me of https://accidentallyquadratic.tumblr.com.

Re: Most popular Python packages now support Python 3

#98
post #64
post #40

I have extreme Python 2-vs-3 fatigue and that's only from seeing the topic on news aggregators for years on end. I can't fathom how tedious the topic must be for those actually in the Python community for the whole time.

Tedious? How so? Because there is no more Python 2 vs 3 anymore. Whoever hasn't migrated will be stuck using deprecated libraries and outdated tools. Yes, Python 3 was initially a risky endeavor, but in the past couple of years it has cemented its position as the true and only version of Python.

For me, completely outside the Python community, I really can't fathom how migrating to the next major version of the language can protract for so long... And I have been in some painful migrations in my life... Java 1.4 to 5 in a >1M loc "enterprise" application. From an object oriented database to oracle in the same application. But it didn't last for close to 10 years. It's simply a complete nonsense to my eyes.

Re: Most popular Python packages now support Python 3

#99

I'm planning to spend my free time in the next couple of months learning Python, should I only learn Python 3?

As someone who asked the same question a few years back (and gladly received the answer: Python 2), I'd suggest you learn both.

Does not matter which language you start in, as long as you can write Python 2/3 compatible code. Perhaps starting with Python 2 (and the fantastic "LearnPythonTheHardWay") helps with this. You'll just have to unlearn a few Py2 warts like xrange and using print statements with ellipses.

You are not being progressive, nor doing your users a favor, if you go exclusively Python 3. Even if the language owners decided not to be backwards compatible, your code still can be (and, IMO, proudly should).

As you arrive to a point where you want to use Python 3 exclusive language features, you'll be at least advanced in Python enough, to form your own well-informed opinion on the matter. I myself don't feel like library support for Python 3 should be the deciding factor for a switch. That's like switching to exclusively designing for a certain browser version, because most websites render just fine, leaving users stuck on IE6 without accessible content.

Re: Most popular Python packages now support Python 3

#100

I'm planning to spend my free time in the next couple of months learning Python, should I only learn Python 3?

As someone who asked the same question a few years back (and gladly received the answer: Python 2), I'd suggest you learn both. Does not matter which language you start in, as long as you can write Python 2/3 compatible code. Perhaps starting with Python 2 (and the fantastic "LearnPythonTheHardWay") helps with this. You'll just have to unlearn a few Py2 warts like xrange and using print statements with ellipses. You…

[deleted]
Post reply on HN