[issue6620] Variable may be used before first being assigned to in Lib/locale.py
Vincent Legoll vincent.leg...@gmail.com added the comment: Yes it does -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6620] Variable may be used before first being assigned to in Lib/locale.py
Mark Dickinson dicki...@gmail.com added the comment: Thanks. Committed in r74312 (trunk), r74313 (py3k). -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6620] Variable may be used before first being assigned to in Lib/locale.py
Mark Dickinson dicki...@gmail.com added the comment: So this can happen only if grouping is [0] (or an equivalent iterable). Since this is an invalid grouping, I think the appropriate response would be for _grouping_intervals([0]) to raise an exception (which is what it currently does as soon as you iterate over the result, though this is possibly not by design. :) Vincent, does the attached patch (_grouping_intervals.patch, against py3k) silence the pylint warning? -- nosy: +marketdickinson Added file: http://bugs.python.org/file14627/_grouping_intervals.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6620] Variable may be used before first being assigned to in Lib/locale.py
New submission from Vincent Legoll vincent.leg...@gmail.com: The last_interval variable could potentially be used before being first assigned a value. -- components: Library (Lib) files: py3k-locale.py-use-before-assignment.patch keywords: patch messages: 91173 nosy: vincele severity: normal status: open title: Variable may be used before first being assigned to in Lib/locale.py versions: Python 3.2 Added file: http://bugs.python.org/file14622/py3k-locale.py-use-before-assignment.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6620 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com