New submission from Michael Smith:

In its __init__ method, shlex.shlex sets self.debug = 0. An `if self.debug:` 
statement follows shortly thereafter and without allowing the user to change 
self.debug.

The code inside the if statement is unreachable. Users should either be 
permitted to set debug on via an optional __init__ parameter, or debug should 
be taken out of the initializer altogether.

----------
components: Library (Lib)
messages: 242399
nosy: Michael.Smith
priority: normal
severity: normal
status: open
title: shlex constructor unreachable code
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue24113>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to