New submission from Gregory P. Smith <g...@krypto.org>:

As noted in the comment on 
https://github.com/rdiff-backup/rdiff-backup/issues/540#issuecomment-789485896

The Python documentation in https://docs.python.org/3/library/os.path.html 
makes an odd claim that bytes cannot represent all file names on Windows.  That 
doesn't make sense.  bytes can by definition represent everything.

"""Vice versa, using bytes objects cannot represent all file names on Windows 
(in the standard mbcs encoding), hence Windows applications should use string 
objects to access all files."""

Could we get this clarified and corrected to cover what any actual technical 
limitation is?

Every OS is going to reject some bytes objects as a pathname for containing 
invalid byte sequences for their filesystem (ex: I doubt any OS allows null 
b'\0' characters).  But lets not claim that bytes cannot represent everything 
on a filesystem with an encoding.

----------
assignee: docs@python
components: Documentation
messages: 388122
nosy: docs@python, gregory.p.smith, steve.dower
priority: normal
severity: normal
stage: needs patch
status: open
title: Misleading statement about bytes not being able to represent windows 
filenames in documentation
versions: Python 3.10, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43403>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to