[Python-projects] pylint: false postive on "next" member of iterator

Huurne, Maarten ter maarten.ter.huurne at philips.com
Thu Mar 26 19:24:37 CET 2009


Hi,

pylint does not seem to know that an iterator has a member called "next":
===
def count():
                n = 0
                while True:
                                yield n
                                n += 1

i = count()
print i.next()
print i.next()
print i.next()
===
E1101:  8: Class 'count' has no 'next' member
E1101:  9: Class 'count' has no 'next' member
E1101: 10: Class 'count' has no 'next' member

Bye,
                                Maarten


________________________________
The information contained in this message may be confidential and legally protected under applicable law. The message is intended solely for the addressee(s). If you are not the intended recipient, you are hereby notified that any use, forwarding, dissemination, or reproduction of this message is strictly prohibited and may be unlawful. If you are not the intended recipient, please contact the sender by return e-mail and destroy all copies of the original message.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.logilab.org/pipermail/python-projects/attachments/20090326/aed1700e/attachment-0001.htm>


More information about the Python-Projects mailing list