logilab-astng #8766 support for namedtuple [done]

Maarteen in python-projects:

on the following program pylint issues a false positive:

from urlparse import urlparse
print urlparse('http://www.logilab.org/project/pylint').path
E1101:  2: Instance of 'ParseResult' has no 'path' member

Here astng correctly infers that urlparse() returns a ParseResult instance, but doesn't know that ParseResult has a "path" member.

This is the line in urlparse.py that defines ParseResult:

class ParseResult(namedtuple('ParseResult', 'scheme netloc path params query fragment'), ResultMixin):
The namedtuple() function is new in Python 2.6 and is documented here:

The class using namedtuple() explicitly lists the members it acquires; it would be very useful if pylint would consider these members present.

appeared in<not specified>
done in<not specified>
load left0.000
closed by#817425accd09 namedtuple support using extended transformation function features. Closes #8766