7 Oct
2012
7 Oct
'12
4:36 a.m.
Greg Ewing writes:
Stephen J. Turnbull wrote:
On the other hand, `p + Path('foo')` and `Path('foo') + p` (where p is a Path, not a string) both seem reasonable to me.
I don't like the idea of using + as the path concatenation operator, because
path + ".c"
is an obvious way to add an extension or other suffix to a filename, and it ought to work.
I don't have a problem with it because I don't append extensions as often as I substitute, and because I don't think of paths as strings. I think of (some) strings as representatives of paths.