• deur@feddit.nl
    link
    fedilink
    arrow-up
    5
    arrow-down
    1
    ·
    1 year ago

    Any dev who pretends Python 2 doesn’t exist should probably look around a bit more. Damn legacy code.

    • jeremyparker@programming.dev
      link
      fedilink
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      Seconding this. For someone that doesn’t know anything about Python, there are vital aspects of Python 2 that need to be covered.

      In the context of learning a language, most of the time, a lower version number doesn’t mean that much. In the case of Python 2, there are fundamental incompatibilities - and, as you say, it’s still out there, and when your see it, you need to know what that means.

      Maybe you don’t choose a library or a piece of software if you notice it. Maybe you get a legacy code base dumped on your lap. This shit happens.

      • twoframesperminute@mastodon.social
        link
        fedilink
        arrow-up
        3
        ·
        1 year ago

        @jeremyparker Those are all valid. But not in a starter guide for someone looking to learn a language. If and when you get submerged into a legacy project you have all the time to find out what’s what. But teaching someone outdated syntax and features just because they *might* come accross them maybe is a terrible way to teach.

        • twoframesperminute@mastodon.social
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          @jeremyparker Note that for people new to a language it’s much harder to distinguish between old and new than someone already familiar with the old. Don’t push old on people starting out.

          This is starting to feel like arguing kids should learn Latin because it might help them understand medical terms better. Sure, that’s true, but a) it’s only useful for a small subset of learners and b) is it worth the effort to learn an entire language just for some minor details?

          • twoframesperminute@mastodon.social
            link
            fedilink
            arrow-up
            1
            ·
            1 year ago

            @jeremyparker As for myself: I use Python as a scientist on an almost daily basis. I’ve never learned anything about Python 2, have never touched it and never required it. Maybe if you work in a field with tons of legacy code it’s useful, but I and all my colleagues are working with Python 3.7 or newer (mostly 3.10 and newer) only. There is no single argument you could make that would convince me I or any of my colleagues should know *anything* about Python 2.