New submission from Shantanu <[email protected]>:

Currently io.open_code (added in Python 3.8) only accepts str arguments. As per 
PEP 519, it should probably also accept PathLike. It might be worth extending 
it to accept bytes as well, both for convenience and because documentation 
claims it should be interchangeable with ``open(path, 'rb')``.

https://github.com/python/cpython/blob/3.8/Modules/_io/_iomodule.c#L510

----------
components: Library (Lib)
messages: 362446
nosy: hauntsaninja
priority: normal
severity: normal
status: open
title: io.open_code should accept PathLike objects
type: enhancement

_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue39723>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to