On 05/12/2016 10:22 AM, Sjoerd Job Postmus wrote:

However, if it were to reject bytes, that would mean that when libraries
start to use pathlib, it would suddenly become harder for people that
actually need bytes-support to use pathlib.

pathlib is not about bytes support. While bytes are necessary in this digital world we live in, most things that look like text should be text, and that includes most paths.

Now, the claim 'if you need bytes, you should not be using pathlib` is a
reasonable one. But what if I need bytes *and* a specific library (say,
image handling, or a web framework, or ...). It's not up to me if that
library uses pathlib or plain old os.path.join.

If you need bytes support for your paths, there's at least one [1] that has that support.

--
~Ethan~


[1] Yeah, it's mine [2]. ;) I haven't checked if the other third-party libs do or not.

[2] <shameless plug> https://pypi.python.org/pypi/antipathy </shameless plug>
_______________________________________________
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

Reply via email to