TIL'ed that in Python you can override the division operator and that it doesn't have to return a float. Pathlib uses this to let you use forward slashes outside of strings!

https://stackoverflow.com/questions/53083963/python-pathlib-operator-how-does-it-do-it

python pathlib operator '/' - how does it do it?

I found the pathlib syntax - or is it the Python syntax - surprising. I'd like to know how this makes the forward slash / act as a joiner of WindowsPaths etc. Does it override/overload / ? It seem...

Stack Overflow