1. 9
  1.  

  2. 12

    You need to enable JavaScript to run this app.

    Can’t make a simple blog page that doesn’t require JS, ncsc.gov.uk?

    Shameful, and makes me not trust the information much.

    1. 7

      It’s amazing how many sites whose primary function is to serve text (e.g. news sites, etc) completely fail when javascript is disabled.

    2. 6

      I think one mistake was pretending that nothing is changing when backporting features from 3 to 2.7. Users of 2.7 could easily live in denial since print function etc. were completely optional.

      There should have been glaring warnings for every attempt to use syntax and types that will break in 3.x.

      1. 1

        Yeah, the 2 => 3 transition was mismanaged. At the very least it should serve as a warning to other languages on how not to do a major version bump.

        1. 2

          I like how OCaml maintainers managed the transition to immutable strings, among other things. First they introduced the bytes type that was an alias for the the mutable string type by default, and a compiler option to enable the string/bytes distinction. Then they added a warning about mutating strings in the default mode. And then they made the new behavior the default and added a compiler option to revert to the old behaviour.

          That way it was obvious what will break, why, and why you want to switch to the new approach.

      2. 5

        I just started using Python in earnest this year and I was constantly infuriated by examples and modules that were Python 2 but had no indication until you started using them. Over and over I’d find a neat module that did exactly what I wanted but then I’d find out it was Python 2. Absolutely maddening.

        1. 1

          Can you give some examples? I found that years ago there was a lot of this, but many libraries I use now are Python3-only, and many of them even explicitly Python3.6+ (probably to use f-strings).

          1. 1

            These were very hardware-oriented modules for doing robotic related things. The primary one that I needed was an interface for iRobot’s open platform: https://github.com/pomeroyb/Create2Control. I gave up and made two separate scripts because I needed Bluetooth from Python 3 libraries.

            1. 2

              I’ve had a very similar experience with various Raspberry Pi hardware add-ons. The vendors typically provide a python library to interface with the hardware, but it’s often not updated after it’s released. Try to build something with 2 or more bits of hardware and you find a horrible mess of mismatched python versions and mismatched dependency versions. Worst of all, you don’t find out until runtime whether two versions are incompatible.

          2. 1

            This year? I’m not disputing your experience, but that’s surprising to me since the the community as a whole has been firmly on Python 3 for years now. http://py3readiness.org/ is all green, etc.

            1. 3

              These were very hardware-oriented modules for doing robotic related things.

              1. 2

                I for one am not surprised. The long tail is pretty long still. We’ll be dealing with infrequently maintained domain specific Py2 codebases and docs for many years to come.

                1. 1

                  I wish I’d known about the “Can I Use Python 3?” tool that is on the page @kbd linked to. That would have saved me some frustrating moments. https://github.com/brettcannon/caniusepython3

          3. 4

            I think it was “Time to Shed Python 2” years ago.

            1. 2

              I enjoyed the snake puns in this article :3 That said, it’s nothing particularly novel - Python 2 is losing support in 2020 and some major players still haven’t deprecated it, the future’s coming up fast so be prepared. We’ve been hearing this for years.

              1. 1

                Sure; I just found it interesting that the warning is coming from an arm of government … usually well known for starting to act about a decade too late on anything of import.

              2. 2

                Is anyone else pissed up by the whole thing? You’ve written tons of Python2 programs and they are tainted now. Plus all the stuff in Python3 isn’t well-thought out enough and you can predict this is going to repeat with Python4/5/6.

                If there’s an upside to it, it has motivated me to look into formal verification & Idris. Python’s issue is that interfaces/libraries are too informally specified. There’s no way to do any kind of upgrades without breaking something in some remote module somewhere written by some user you’re not even aware of.

                1. 1

                  I’m optimistic that future major version bumps won’t be nearly so painful, but yeah it’s taught me the benefits of languages that may be harder to read (at least initially) but are easier to reason about.

                  1. 1

                    formal verification & Idris

                    Good stuff, but ambitious. Just having a strong static type system gets you much of the way there. GHC Haskell introduces compatibility-breaking features all the time twice yearly and the community just seems to absorb it without much complaint. On the other hand, the Haskell community is not the Python community! From what I’ve seen most languages don’t have Python’s strong focus on conventions.

                    1. 1

                      Just having a strong static type system gets you much of the way there.

                      I’d like interface specifications to convey how you can use them and what kind of guarantees they provide. Also once such interface has been published, I want that if it ever changes, a revision number is bumped up.

                      I’m tired to software that breaks because things are slightly incompatible. If things don’t work together, I don’t ever want them to fit together.

                      I don’t get anything of that with strong static typing.

                      1. 1

                        Off the top of my head, I’m guessing the Python community is 2 to 3 orders of magnitude larger than the Haskell community. That makes reaching “consensus” (rough term) about things like breaking language changes much harder.

                        1. 2

                          For sure. Also Python specifically targets beginners, non-computer scientists, and others who don’t really care about programming languages as such: it’s a good language for non-programmers, and not by accident. Meanwhile, Haskell has historically had its strongest user base in (certain sub-fields of) academic computer science.

                          Still, all that taken into consideration, I believe that Haskell’s type system is a strong reason why the community requires much less consensus. Refactoring a project to accommodate language changes (or anything else) is much less nerve-wracking in Haskell than in Python; I’ve experienced that for myself.

                    2. 1

                      I have some concerns about looking at pypi stats as I suspect most of them are from CI jobs not usage by humans. As more down-stream projects drop python2 I expect those stats to rapidly drop off.

                      If you ask developers the numbers look much better: https://www.jetbrains.com/research/python-developers-survey-2018/#pyversions_2 (84% py3 16% py2).