[issue35538] splitext does not seems to handle filepath ending in .
New submission from Devika Sondhi : posixpath.splitext('.blah.') returns ('.blah', '.') while the expectation was to return an empty extension at the end. -- messages: 332157 nosy: Devika Sondhi priority: normal severity: normal status: open title: splitext does not seems to handle filepath ending in . versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker <https://bugs.python.org/issue35538> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35538] splitext does not seems to handle filepath ending in .
Devika Sondhi added the comment: Linux (unlike Windows) allows naming a file with a trailing dot. The issue with file name such as '.blah.' is that it does not have an extension and one would expect the base-name without extension to be returned as '.blah.' and not as '.blah' splitext returns ('.blah','.') -- resolution: not a bug -> status: closed -> pending ___ Python tracker <https://bugs.python.org/issue35538> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35612] Text wrap over text containing tab character
New submission from Devika Sondhi : textwrap.wrap does not seem to preserve tab character ('\t') in the text if it is not separated from other characters by a space. Example: >>> textwrap.wrap("Here is\tone line of text that is going to be wrapped after >>> 20 columns.",20) ['Here is one line of', 'text that is going', 'to be wrapped after', '20 columns.'] The tab is missing from the above output. However, for text with \t separated by space, the behavior is as expected (shown below). >>> textwrap.wrap("Here is \t one line of text that is going to be wrapped >>> after 20 columns.",20) >>> ['Here is one', 'line of text that is', 'going to be wrapped', 'after 20 columns.'] -- components: Tests messages: 332712 nosy: Devika Sondhi priority: normal severity: normal status: open title: Text wrap over text containing tab character versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue35612> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35612] Text wrap over text containing tab character
Devika Sondhi added the comment: I wasn't aware of this. Thanks for clarifying -- stage: -> resolved status: open -> closed ___ Python tracker <https://bugs.python.org/issue35612> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue35613] Escaping string containing invalid characters as per XML
New submission from Devika Sondhi : As per XML 1.0 and 1.1 specs, the null character is treated as invalid in an XML doc. (https://en.wikipedia.org/wiki/Valid_characters_in_XML) Shouldn't invalid xml characters be omitted while escaping? The current behavior(tested on Python 3.7) is as follows: >>> from xml.sax.saxutils import escape >>> escape("a\u\u0001\u0008\u000b\u000c\u000e\u001fb") 'a\x00\x01\x08\x0b\x0c\x0e\x1fb' -- messages: 332716 nosy: Devika Sondhi priority: normal severity: normal status: open title: Escaping string containing invalid characters as per XML versions: Python 3.7 ___ Python tracker <https://bugs.python.org/issue35613> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com