[issue23017] string.printable.isprintable() returns False
R. David Murray
report at bugs.python.org
Tue Dec 9 16:14:34 CET 2014
R. David Murray added the comment:
This is a bit of a conundrum. Our (string module) definition of printable is very clear, and it includes the other whitespace characters.
We could document that this does not match the posix definition of printable. It also does not match the RFC 5822 definition of printable (for example), which does *not* include whitespace characters (not even space), but the posix definition is a more likely source of confusion.
isprintable is a newer function than string.printable, and serves a different purpose. I suppose that when PEP 3138 was written and implemented the disconnect between the two definitions was not noticed.
For backward compatibility reasons I suspect we are stuck with the discrepancy, but perhaps others will think it worth the pain of changing string.printable. I kind of doubt it, though.
----------
assignee: -> docs at python
components: +Documentation
nosy: +docs at python, r.david.murray
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23017>
_______________________________________
More information about the Python-bugs-list
mailing list