pylint #63420 detect errors caused by % having a greater priority than + [open]
I now and again get bitten by: for i in range(10): print 'iteration %d' % i+1 which fails because % is evaluated before +, and you cannot add a string and an integer in Python. Pylint+astng should be able to infer the types of the operands in the above example and issue an error. | |
priority | normal |
---|---|
type | enhancement |
done in | <not specified> |
closed by | <not specified> |