Invalid Inspection with enumerate

I'm not sure if this is a bug, a feature, or just bad coding practice on my part, but I have code similar to the following:

tupleList = [('a,b,c',42), ('d,e', 17), ('f,g,h', 123)]
for keyID, (keyList, value) in enumerate(tupleList):
    for key in keyList.split(','):
        print keyID, key
where tupleList is a list of tuples, each tuple consisting of a string and an int, and I'm enumerating and unpacking the tuples on the fly.

Pycharm is apparently interpreting keyList as an int and is giving me an 'Unresolved attribute reference' warning for the .split() method.

It seems to work so I can just ignore the warning in this case, but is this the expected behavior?

Running Pycharm 2.7.1 on Win XP SP3
FWIW, I just upgraded to PyCharm 2.7.3 and it exhibits the same behavior.
This is a known bug PY-9334. Feel free to vote for it to get notifications.
I up-voted it - thanks for the update.

Please sign in to leave a comment.