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

Python

6688 readers
1 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 2 years ago
MODERATORS
21
Python's pathlib module (www.pythonmorsels.com)
submitted 3 months ago by norambna to c/python
you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 8 points 3 months ago (1 children)

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

[โ€“] [email protected] 2 points 3 months ago

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