New submission from Augie Fackler <li...@durin42.com>:

I'm not really sure if this is a bug per se, so please feel encouraged to close 
as WAI if you like, but:

>>> open(b'foo', 'rb')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
FileNotFoundError: [Errno 2] No such file or directory: b'foo'

Seems a little weird to me (and it shows up in the UI layer of hg), because the 
path-as-bytes seems like it shouldn't show up in the human-readable version of 
the exception (I think I would have expected the fsdecode() of the bytes, for 
consistency?)

But that's up to you. If the presentation format of this feels right to Python 
that's no big deal.

----------
messages: 363297
nosy: durin42
priority: normal
severity: normal
status: open
title: FileNotFoundError et al show b-prefix on filepaths if passed as bytes
versions: Python 3.7

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

Reply via email to