18
Python's pathlib module (www.pythonmorsels.com)
you are viewing a single comment's thread
view the rest of the comments
[-] leds@feddit.dk 6 points 4 days 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

[-] Diplomjodler3@lemmy.world 2 points 4 days ago

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

this post was submitted on 18 Nov 2024
18 points (100.0% liked)

Python

6394 readers
12 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 1 year ago
MODERATORS