René's URL Explorer Experiment


Title: OOP in Python, part 15: Class structure in pathlib

Open Graph Title: OOP in Python, part 15: Class structure in pathlib

X Title: OOP in Python, part 15: Class structure in pathlib

Description: MP 59: How file paths are modeled in pathlib.

Open Graph Description: MP 59: How file paths are modeled in pathlib.

X Description: MP 59: How file paths are modeled in pathlib.

Opengraph URL: https://www.mostlypython.com/oop-in-python-part-15-class-structure/

X: @ghost

Generator: Ghost 6.52

direct link

Domain: www.mostlypython.com


Hey, it has json ld scripts:
{
    "@context": "https://schema.org",
    "@type": "Article",
    "publisher": {
        "@type": "Organization",
        "name": "Mostly Python",
        "url": "https://www.mostlypython.com/",
        "logo": {
            "@type": "ImageObject",
            "url": "https://storage.ghost.io/c/b0/88/b088fa59-ac78-44d9-9662-4c7568d7cb9a/content/images/size/w256h256/2024/02/logo_200px.png",
            "width": 60,
            "height": 60
        }
    },
    "author": {
        "@type": "Person",
        "name": "Eric Matthes",
        "url": "https://www.mostlypython.com/author/eric-matthes/",
        "sameAs": []
    },
    "headline": "OOP in Python, part 15: Class structure in pathlib",
    "url": "https://www.mostlypython.com/oop-in-python-part-15-class-structure/",
    "datePublished": "2023-10-12T16:30:40.000Z",
    "dateModified": "2024-03-25T20:13:57.000Z",
    "image": {
        "@type": "ImageObject",
        "url": "https://storage.ghost.io/c/b0/88/b088fa59-ac78-44d9-9662-4c7568d7cb9a/content/images/image/fetch/w_2000,h_2000,c_fill,f_jpg,q_auto:good,fl_progressive:steep,g_auto/https-3a-2f-2fsubstack-post-media.s3.amazonaws.com-2fpublic-2fimages-2f7c7735ce-7d7d-44cf-a207-874254ac3f0e_519x484.jpg",
        "width": 519,
        "height": 484
    },
    "keywords": "Newsletter, OOP, under the hood",
    "description": "MP 59: How file paths are modeled in pathlib.",
    "mainEntityOfPage": "https://www.mostlypython.com/oop-in-python-part-15-class-structure/"
}
    

referrerno-referrer-when-downgrade
og:site_nameMostly Python
og:typearticle
og:imagehttps://storage.ghost.io/c/b0/88/b088fa59-ac78-44d9-9662-4c7568d7cb9a/content/images/image/fetch/w_1200,h_600,c_fill,f_jpg,q_auto:good,fl_progressive:steep,g_auto/https-3a-2f-2fsubstack-post-media.s3.amazonaws.com-2fpublic-2fimages-2f7c7735ce-7d7d-44cf-a207-874254ac3f0e_519x484.jpg
article:published_time2023-10-12T16:30:40.000Z
article:modified_time2024-03-25T20:13:57.000Z
article:tagunder the hood
article:publisherhttps://www.facebook.com/ghost
twitter:cardsummary_large_image
twitter:urlhttps://www.mostlypython.com/oop-in-python-part-15-class-structure/
twitter:imagehttps://storage.ghost.io/c/b0/88/b088fa59-ac78-44d9-9662-4c7568d7cb9a/content/images/size/w1200/image/fetch/f_auto,q_auto:best,fl_progressive:steep/https-3a-2f-2fmostlypython.substack.com-2fapi-2fv1-2fpost_preview-2f137819086-2ftwitter.jpg
twitter:label1Written by
twitter:data1Eric Matthes
twitter:label2Filed under
twitter:data2Newsletter, OOP, under the hood
og:image:width519
og:image:height484

Links:

Mostly Python https://www.mostlypython.com
Homehttps://www.mostlypython.com/
Topicshttps://www.mostlypython.com/topics/
Serieshttps://www.mostlypython.com/series/
Abouthttps://www.mostlypython.com/about/
Contacthttps://www.mostlypython.com/contact/
Just readhttps://www.mostlypython.com/just-read/
Sign inhttps://www.mostlypython.com/oop-in-python-part-15-class-structure#/portal/signin
Subscribehttps://www.mostlypython.com/oop-in-python-part-15-class-structure#/portal/signup
Newsletterhttps://www.mostlypython.com/tag/newsletter/
https://www.mostlypython.com/author/eric-matthes/
Eric Mattheshttps://www.mostlypython.com/author/eric-matthes/
serieshttps://www.mostlypython.com/oop-in-python
previous posthttps://www.mostlypython.com/oop-in-python-part-14-the-exception
next posthttps://www.mostlypython.com/oop-in-python-part-16-class-structure-ce8
last posthttps://www.mostlypython.com/oop-in-python-part-14-the-exception/
definitionhttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L857
earlier posthttps://mostlypython.substack.com/p/oop-in-python-part-7-the-__new__?ref=mostlypython.com
methodhttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L868
implementationhttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L903
methodhttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L1230
implementationhttps://github.com/python/cpython/blob/28c6cc1928bf517076a44b4112f7f56dae7f076b/Lib/pathlib.py?ref=mostlypython.com#L1391C1-L1396C19
identical structurehttps://github.com/python/cpython/blob/28c6cc1928bf517076a44b4112f7f56dae7f076b/Lib/pathlib.py?ref=mostlypython.com#L1398
classeshttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L834
middlehttps://github.com/python/cpython/blob/28c6cc1928bf517076a44b4112f7f56dae7f076b/Lib/pathlib.py?ref=mostlypython.com#L273C1-L274C33
classeshttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L112
base classhttps://github.com/python/cpython/blob/28c6cc1928bf517076a44b4112f7f56dae7f076b/Lib/pathlib.py?ref=mostlypython.com#L49
methodhttps://docs.python.org/3/library/stdtypes.html?ref=mostlypython.com#str.join
1https://www.mostlypython.com/oop-in-python-part-15-class-structure#footnote-1
first parthttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L455
methodhttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L549
methodhttps://github.com/python/cpython/blob/3.11/Lib/pathlib.py?ref=mostlypython.com#L631
docshttps://docs.python.org/3/library/pathlib.html?ref=mostlypython.com
hierarchyhttps://docs.python.org/3/library/pathlib.html?ref=mostlypython.com
https://www.mostlypython.com/oop-in-python-part-15-class-structure#footnote-anchor-1
Exploring chess games MP 171: A first foray into the massive Lichess database. I've been getting back into chess since moving to North Carolina, and as part of that journey I've been wanting to analyze games in ways that weren't really possible when I was last playing By Eric Matthes Jul 9, 2026 https://www.mostlypython.com/exploring-chess-games/
I keep being be impressed by uv MP 170: It understands my old projects! A few years ago I made a small project that automatically adds borders to screenshots, because macOS doesn't have a built-in tool to easily do that. For a couple years I installed it globally on every system I used, so By Eric Matthes Jun 25, 2026 https://www.mostlypython.com/i-keep-being-be-impressed-by-uv/
An LLM can't go for a walk in the woods MP 169: But we still can, and we should keep doing so. Regular readers of Mostly Python are probably aware that I'm currently working on gh-profiler. It helps open source maintainers make better-informed decisions about how much time to invest with users who open new PRs By Eric Matthes Jun 11, 2026 https://www.mostlypython.com/an-llm-cant-go-for-a-walk-in-the-woods/
Batching API calls MP 168: An obvious speedup, with a surprising side benefit. I've been working steadily on gh-profiler, while attending PyCon US and working on other projects as well. The project makes a number of calls to GitHub's API, and then analyzes the results to generate some By Eric Matthes May 28, 2026 https://www.mostlypython.com/batching-api-calls/
Sign uphttps://www.mostlypython.com/oop-in-python-part-15-class-structure#/portal/
Ghosthttps://ghost.org/

Viewport: width=device-width, initial-scale=1.0


URLs of crawlers that visited me.