logilab-astng #20464 Checking code raises “TypeError: '_Yes' object is not iterable” [resolved]

Hello

Using this pylint version:

$ pylint --version
pylint 0.19.0,
astng 0.19.3, common 0.46.0
Python 2.5.2

The following cut-down version of a larger script raises “TypeError: '_Yes' object is not iterable”. The script as given wouldn't work, but it reproduces the error in pylint. If I change “xyz = ["foobar=%s" % options.ca,] + A + B” to “xyz = A + B + ["foobar=%s" % options.ca,]”, pylint doesn't fail with a backtrace. While the same exception, this does not seem to be a duplicate of <http://www.logilab.org/ticket/9891>. The full backtrace is at the end of this e-mail.

import optparse

A = []
B = []

def Test(mode):
  xyz = [
    "foobar=%s" % options.ca,
  ] + A + B

  if options.bind is not None:
    xyz.append("bind=%s" % options.bind)

def main():
  global options

  parser = optparse.OptionParser()
  (options, args) = parser.parse_args()
prioritynormal
typebug
appeared in<not specified>
done in0.20.0
load1.000
load left0.000
closed by<not specified>