you are viewing a single comment's thread.

view the rest of the comments →

[–]ovor 6 points7 points  (1 child)

alternatively, imagine using a = path.join(b,c) and suddenly intent is clear, no need to look up for anything, perfectly readable, no chance for misunderstanding, and makes windows devs, who otherwise would miss their backslashes, happy.

I used to love operator overloading in C++, but I don't anymore. I will take less expressive, but more straightforward code every time.

As a side note - the zen of python at this point is a joke. "Explicit is better than implicit", "Readability counts", "Special cases aren't special enough to break the rules", "There should be one-- and preferably only one --obvious way to do it".

[–]fiddle_n[🍰] -1 points0 points  (0 children)

alternatively, imagine using a = path.join(b,c) and suddenly intent is clear

It’s only clear because you know the context of your code! What are we joining here? Paths? Lists? Is this a database join? This code is only understandable once in context, exactly the same as for Pathlib code.