Author roger.serwy
Recipients roger.serwy
Date 2012-10-11.19:09:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The documentation for shlex does not prohibit the user from setting .posix=True after creating a shlex object. When doing so, the .eof attribute is inconsistent, creating an infinite loop in the __next__ method.

Here's some sample code to recreate the issue:

import shlex
s = shlex.shlex(r"", posix=False)
s.posix = True

One possible solution is to make .posix a read-only property. Another is to make .posix a property which sets .eof correctly.
Date User Action Args
2012-10-11 19:09:30roger.serwysetrecipients: + roger.serwy
2012-10-11 19:09:30roger.serwysetmessageid: <>
2012-10-11 19:09:30roger.serwylinkissue16200 messages
2012-10-11 19:09:29roger.serwycreate