• Ethan@programming.dev
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 day ago

    “Assume it’s a map and treat like a map and then catch the type error if it’s not.” Paraphrased from actual advice by Guido on how you should write Python. Python isn’t a bad language but the philosophy that comes along with it is so fucked.

        • manicdave@feddit.uk
          link
          fedilink
          arrow-up
          2
          arrow-down
          1
          ·
          18 hours ago

          Why though? I’ve genuinely never had a problem with it. If something is wrong, it was always going to be wrong. Why is it preferable to have to write a bunch of bolierplate than just deal with the stacktrace when you do encounter a type error?