Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > code check for modifying sequence while iterating over it?

Reply
Thread Tools

code check for modifying sequence while iterating over it?

 
 
Neal Becker
Guest
Posts: n/a
 
      08-31-2007
After just getting bitten by this error, I wonder if any pylint, pychecker
variant can detect this error?

 
Reply With Quote
 
 
 
 
Alex Martelli
Guest
Posts: n/a
 
      09-02-2007
Neal Becker <> wrote:

> After just getting bitten by this error, I wonder if any pylint, pychecker
> variant can detect this error?


I know pychecker can't (and I doubt pylint can, but I can't download the
latest version to check as logilab's website is temporarily down for
maintenance right now). It's a very thorny problem to detect a
reasonable subset of likely occurrences of this bug by static analysis
only, i.e., without running the code


Alex
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ 4.57 What happens if I add or remove keys from a hash while iterating over it? PerlFAQ Server Perl Misc 0 01-10-2011 05:00 PM
Slow down while creating a big list and iterating over it marc magrans de abril Python 6 01-31-2010 10:42 PM
how to iterate over sequence and non-sequence ? stef mientki Python 13 10-20-2007 10:21 AM
modifying a list while iterating through dustin.getz@gmail.com Python 4 02-26-2007 10:21 PM
Good practice? modifying vector while iterating through it Alan C++ 5 02-19-2007 05:28 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57