On Mon, May 7, 2018 at 8:44 PM, Steven D'Aprano <[email protected]> wrote: > On Sun, May 06, 2018 at 09:33:03PM -0700, Nathaniel Smith wrote: > >> How is >> >> data_path = __filepath__.parent / "foo.txt" >> >> more distracting than >> >> data_path = joinpath(dirname(__file__), "foo.txt") > > > Why are you dividing by a string? That's weird. > > [looks up the pathlib docs] > > Oh, that's why. It's still weird. > > So yes, its very distracting.
Isn't it strange how we can divide a path by a string, and that works, and we can take the remainder after you divide a string by a string, and that works as long as there's exactly one "%s" in the string, but nobody's interested in having "foo bar spam ham"/" " ==> ["foo","bar","spam","ham"] ? Just sayin', it ain't all that strange. ChrisA _______________________________________________ Python-ideas mailing list [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
