[Python-projects] Possible error within PyLint
Helmut Namyslo
Helmut.Namyslo at ptv.de
Thu Feb 7 11:09:44 CET 2008
Dear Logilab Team,
First of all I want you to thank for the great tool PyLint. It really halps us to keep
our Python code clean. Maybe I found a little error within PyLint. Look at the
following code sequence:
1: x = 10
2: for x in range(5):
3: print x
4:
5: if x > 0:
6: print '#' * x
PyLint produces the following messages:
Message File Name Line Position
[W] Using possibly undefined loop variable 'x' D:\Vision_QA\Other\test.py 5
[W] Using possibly undefined loop variable 'x' D:\Vision_QA\Other\test.py 6
As far as I understand this code, there is no risk that variable x might be undefined at lines 5 and 6.
I hope this info can help you to make PyLint even better.
Kind regards,
Helmut Namyslo
PTV AG
PTV Vision Quality Management
Tel.: +49 721 9651-7163
Fax: +49 721 9651-693
E-Mail: helmut.namyslo at ptv.de
____________________________
PTV
Planung Transport Verkehr AG
Stumpfstraße 1
76131 Karlsruhe
Germany
http://www.ptv.de
http://www.reiseplanung.de
____________________________
PTV Planung Transport Verkehr AG
Hauptsitz / Headquarters: Karlsruhe
Vorstand / Board of Directors: Dr.-Ing. Hans Hubschneider, Dr. Joachim Schmidt, Dr.-Ing. Thomas Schwerdtfeger, Harald Holberg
Vorsitzender des Aufsichtsrates / Chairman of the Board: Dr. Volkmar Mair
Handelsregister / Companies' Register (HRB-Nr): 109262
Amtsgericht / District Court: Mannheim
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.logilab.org/pipermail/python-projects/attachments/20080207/ae7e4188/attachment.htm
More information about the Python-Projects
mailing list