<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Wed, 6 Apr 2016 at 16:25 Nathaniel Smith <<a href="mailto:njs@pobox.com">njs@pobox.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, Apr 6, 2016 at 3:46 PM, Brett Cannon <<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>> wrote:<br>
><br>
><br>
> On Wed, 6 Apr 2016 at 15:22 Paul Moore <<a href="mailto:p.f.moore@gmail.com" target="_blank">p.f.moore@gmail.com</a>> wrote:<br>
>><br>
>> So I think we need a builtin.<br>
><br>
><br>
> Well, the ugliness shouldn't survive forever if the community shifts over to<br>
> using pathlib while the built-in will. We also don't have a built-in for<br>
> __index__() so it depends on whether we expect this sort of thing to be the<br>
> purview of library authors or if normal people will be interacting with it<br>
> (it's probably both during the transition, but I don't know afterwards).<br>
<br>
For __index__ the "built-in" is:<br>
<br>
from operator import index<br></blockquote><div><br></div><div>Which suggests perhaps we should have pathlib.fspath() instead of a built-in. </div></div></div>