code check for modifying sequence while iterating over it?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Neal Becker

    #1

    code check for modifying sequence while iterating over it?

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

  • Alex Martelli

    #2
    Re: code check for modifying sequence while iterating over it?

    Neal Becker <ndbecker2@gmai l.comwrote:
    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

    Comment

    Working...