<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 7, 2014 at 8:03 AM, Wolfgang Maier <span dir="ltr"><<a href="mailto:wolfgang.maier@biologie.uni-freiburg.de" target="_blank">wolfgang.maier@biologie.uni-freiburg.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> then call str() on all input that passes an isinstance(input, Path) check, raise an error otherwise.</blockquote></div><br>Calling: </div><div class="gmail_extra">   </div><div class="gmail_extra">    path=str(path)</div><div class="gmail_extra"><br></div><div class="gmail_extra">within all API functions that accept file paths is a good enough solution, and one that doesn't change dependencies in stdlib.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Most of the API functions I've had to call with str(path) don't return another path, but some more-structured else (json, csv, configparser, ...).</div><div class="gmail_extra"><br></div><div class="gmail_extra">Maintainers could silently start adding the path=str(path) prolog to the API so declaring official support for Path can be postponed until it is certified that there's 100% coverage in stdlib.<br><br clear="all"><div>Cheers,</div><div><br></div>-- <br><span style="color:rgb(0,102,0)">Juancarlo </span><b style="color:rgb(0,102,0)">Añez</b>
</div></div>