This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cheryl.sabella
Recipients cheryl.sabella, daniel-s, hoadlck
Date 2019-01-04.17:25:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1546622703.07.0.08356638462.issue19120@roundup.psfhosted.org>
In-reply-to
Content
There was a parameter `punctuation_chars` added to the shlex.shlex class with issue 1521950 (implemented for 3.6).  Although the comma is not one of the default punctuation characters (setting the parameter to punctuation_chars=True won't change the behavior), you can use `punctuation_chars=","` to see the results reported in this issue.


>>> second = shlex.shlex('word1 word2,\nword3', punctuation_chars=',')
>>> second.get_token()
'word1'
>>> second.lineno
1
>>> second.get_token()
'word2'
>>> second.lineno
1
>>> second.get_token()
','
>>> second.lineno
2
>>>


Closing this as a duplicate of #1521950.
History
Date User Action Args
2019-01-04 17:25:05cheryl.sabellasetrecipients: + cheryl.sabella, daniel-s, hoadlck
2019-01-04 17:25:03cheryl.sabellasetmessageid: <1546622703.07.0.08356638462.issue19120@roundup.psfhosted.org>
2019-01-04 17:25:03cheryl.sabellalinkissue19120 messages
2019-01-04 17:25:02cheryl.sabellacreate