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@python
components: +Documentation
nosy: +docs@python, r.david.murray

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

Reply via email to