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() | |
priority | normal |
---|---|
type | bug |
done in | 0.20.0 |
load | 1.000 |
load left | 0.000 |
closed by | <not specified> |
similar entities
- logilab-astng #2459 __path__ handling
- pylint #4288 message [en|dis]abling refactoring
- logilab-astng #9515 strange message for non-class "Class baz has no egg member"
- pylint #3203 disabling W0702 (no exception's type specified) works in a strange way
- pylint #4016 message deactivation / multi lines statements
[see all]
Comments
-
2011/03/03 15:52, written by bobkarreman
-
2011/03/04 17:41, written by sthenault
add commentHello,
We are using version 0.23 and still see this problem.
Is this going to be pushed to the code sometime soon?
Cheers
Bob
well, it has somewhat be fixed since the code snippet in the ticket doesn't cause this problem anymore.
Could you try to isolate a minimal code snippet for your problem?