New submission from Roger Serwy: 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. ---------- components: Library (Lib) messages: 172677 nosy: serwy priority: normal severity: normal status: open title: Setting .posix=True for shlex object causes infinite loop in __next__ type: behavior versions: Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16200> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com