On Fri, May 13, 2016 at 8:19 PM, Steven D'Aprano <st...@pearwood.info> wrote: > I feel this is Not Our Problem. Surely the stdlib cannot be held > responsible for all the poor decisions made by third-party libraries? If > a library hard-codes "\\" as their directory separator, because everyone > uses Windows, you'd simply say "this library is not very good for my > use-case". Likewise if it rejects bytes paths, then: > > - perhaps that library is not fit for your purpose; > > - perhaps you can use it, but with the limitation that you can no > longer support all paths, but only the ones which can be > accessed via a string path; > > - perhaps you can build a compatibility layer that lets you use > both bytes and the library.
AFAICT, the compatibility layer would simply decode the bytes using surrogateescape handling, which should round-trip anything. Or am I wrong here somewhere? ChrisA _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com