<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Mar 27, 2016 at 1:23 AM, Koos Zevenhoven <span dir="ltr"><<a href="mailto:k7hoven@gmail.com" target="_blank">k7hoven@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class="">On Sat, Mar 26, 2016 at 9:10 PM, Brett Cannon <span dir="ltr"><<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">[...]</div></blockquote></span><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_quote"><div>I also want to mention two things. One, pathlib.path is a thing now and something most people are probably not aware of as an alternative to doing `str(path)`: <a href="https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.path" target="_blank">https://docs.python.org/3/library/pathlib.html#pathlib.PurePath.path</a> .</div></div></div></blockquote><div><br></div></span><div>I assume you meant to type pathlib.Path.path, so that Path("...").path == str(Path("...")). That's a good start, and I'm looking forward to Serhiy's patch for making the stdlib accept Paths. But if Path will not subclass str, we also need new stdlib functions that *return* Paths.</div><span class=""><font color="#888888"><div><br></div></font></span></div></div></div></blockquote><div><br></div><div>Well, just to reply to myself, here's a slightly crazy idea, which I'll mention before I realize that it's a bad idea:</div><div><br></div><div>What if there was a another class, say StringPath, that inherits from both str and Path, which wraps another instance of Path, but is also a str. When you call its Path methods, it would delegate them to the wrapped Path object so that functions that now return paths as plain str could in future versions start returning that type? </div><div> </div><div> - Koos</div><div><br></div></div></div></div>