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 roger.serwy
Recipients roger.serwy
Date 2012-10-11.19:09:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1349982570.12.0.849029926696.issue16200@psf.upfronthosting.co.za>
In-reply-to
Content
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
list(s)

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