• Diplomjodler
    link
    26 hours ago

    They could have chosen a better operator. But the functionality is fantastic. Makes working with paths so much easier. And you can even use slashes on windows paths.

    • @[email protected]
      link
      fedilink
      32 hours ago

      It makes the code so much more clean and readable since you’re dropping multiple levels of brackets , for example

      os.path.join( a, b, os.path.dirname(c))

      Becomes

      a / b / c.parent

      I really like it

      • Diplomjodler
        link
        22 hours ago

        I always hated os.path. pathlib is just so much better.