• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    Wow, they (apparently) finally made the REPL not suck! I always thought it was weird how shit it was given that it’s one of the big reasons Python has become as popular as it is.

    Maybe in another 20 years they can make the package tooling not suck too.

  • fubarx@lemmy.ml
    link
    fedilink
    arrow-up
    2
    ·
    2 months ago

    Now only have to wait for:

    • pyenv release
    • pycharm update (including terminal)
    • 3rd party libraries

    to catch up…

    • misk@sopuli.xyz
      link
      fedilink
      arrow-up
      2
      ·
      2 months ago

      Once that happens it’ll be just couple of years until trickles down to corpo I work at :(

      We got Python 3.10 in our Hadoop/Spark setup recently. I’m really enjoying those improved debug messages, man.

      • NostraDavid@programming.dev
        link
        fedilink
        arrow-up
        0
        ·
        edit-2
        1 month ago

        Protip: pip install pyupgrade And then find . -name '*.py' -not -path '*.tox*' -print0 | xargs -0 pyupgrade --py310-plus in your repo to update what can be updated.

        BTW, pyupgrade’s creator, asottile (that’s his name) also has an informative channel: Anthony Writes Code where he explains Python features, or goes into interesting bugs he ran into, etc. The good stuff.

        • misk@sopuli.xyz
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          1 month ago

          You assume that I can access PIP on a big data cluster in a financial institution ;) Even updating packages there requires me to ask for a custom image. I’m a data analyst so I just transform and extract what I can in a way that reduces size of the output and do cool stuff on my machine that has Python 3.11 and access to validated PyPI mirror. ETL that happens entirely on the cluster needs to be so optimised that I don’t need anything fancy thankfully.

      • faltryka@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        2 months ago

        I know some people who have their work pay for it. I pay for the all products pack and it decreases in cost each year until a certain point. Not sure if I’m on some extra discount or whatnot but I only pay $18/mo and it’s easily worth it.

  • gigachad@sh.itjust.works
    link
    fedilink
    arrow-up
    1
    ·
    2 months ago

    Nice I guess it’s time to check if my daily used libraries have stable 3.12 releases already.

    I guess the free-threaded mode and the JIT compiler will be the most important features from what I read, but their significance is out of my expertise.

    My absolute favorite with this update is the new REPL! It features Multiline-editing and a paste mode for easier pasting code. It also added the spaces automatically in my example.

    Sometimes I want to make some quick tests on some data in the terminal without installing IPython to my environment first, this is great news!

    This new error message will also be very useful for beginners and relieve StackOverflow:

    AttributeError: module 'numpy' has no attribute 'array' (consider renaming '/home/me/numpy.py' if it has the same name as a third-party module you intended to import)
    
    
    • mamg22@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      2 months ago

      That last one is going to be so good. Months ago I ran into that while porting the “Crafting Interpreters” java-based interpreter into python. It took me a few hours to figure out that one of my modules was colliding with “token” in the stdlib, a module I didn’t even know existed. Glad it’s being made clearer.