• AbsolutelyNotCats@lemdro.id
    link
    fedilink
    English
    arrow-up
    4
    arrow-down
    7
    ·
    edit-2
    1 year ago

    Honestly who is using python nowadays? I would rather be shell scripting (I’m not even kidding, i do it)

    • 1rre@discuss.tchncs.de
      link
      fedilink
      arrow-up
      4
      arrow-down
      1
      ·
      1 year ago

      I think you’re near enough alone… Python is up there with the best ways to call other people’s code, due to the support for types beyond string…

        • Dandroid@dandroid.app
          link
          fedilink
          arrow-up
          1
          ·
          1 year ago

          So you’re wasting hours of development time to save a couple of milliseconds of run time.

          If that’s your only criteria for choosing a language, you’re gonna have a bad time.

    • Dandroid@dandroid.app
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      Do you do any scripts beyond extremely simple ones?

      I do a fuck ton of scripting in both bash and python. I never want to do string manipulation in bash. As soon as string manipulation is required, I automatically choose python for a script. Also, if I need named arguments or multiple levels of arguments for subcommands. You can use sys.argv for basic args, which isn’t any harder than bash arguments, but for complex inputs, argparse is a godsend. It has a bit of a learning curve, but it can handle anything. Bash requires you to write complex arg handling manually with loops and reducing.

      • Gork@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        1 year ago

        I’m trying to bash it but the problem persists. Please help.