Re: [Python-Dev] Pathlib enhancements - acceptable inputs and outputs for __fspath__ and os.fspath()

2016年4月12日 00:54:36 -0700

INADA Naoki writes:
 > > Why not print(obj)?
print(obj) will give mojibake by default if
sys.getfilenameencoding() != sys.getdefaultencoding().
 > > str() is normal high-level API, and __fspath__ and os.fspath() should be
 > > low level API.
 > > Normal users shouldn't use __fspath__ and os.fspath(). Only library
 > > developers should use it.
This is the price we pay for the stubbornness of the
bytes-are-text-too meme.
_______________________________________________
Python-Dev mailing list
[email protected]
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