list and implicit continuation may cause bugs in Python programs

Toby Dickenson tdickenson at devmail.geminidataloggers.co.uk
Tue Jul 17 14:45:48 CEST 2001


Roman Suzi <rnd at onego.ru> wrote:

>>> Do not forget commas:
>>>
>>> list =[ "update", "y", "m", "d", "y1", "m1", "d1", "event", "url",
>>>          "preview" ]
>>>
>>> list =[ "update", "y", "m", "d", "y1", "m1", "d1", "event", "url"
>>>          "preview" ]
>>>
>>> Does PyChecker check for these kind of things?
>>>
>>
>>For what reason should it check ? Both is valid Python code. In the second
>>case 'url' and 'preview' are concatenated. This is dedicated behaviour.
>>
>
>PyChecker is about determining ambiguity, like lint
>will give you warnings about
>
>if (a=b) { };
>
>in C code.

Which, as I am sure you know, is no more ambiguous in C than the
Python fragment above.


Toby Dickenson
tdickenson at geminidataloggers.com



More information about the Python-list mailing list