[issue20956] tokenize module claims generate_tokens returns namedtuple, but it doesn't

Eric V. Smith report at bugs.python.org
Mon Mar 17 13:41:56 CET 2014


Eric V. Smith added the comment:

The 2.x documentation says generate_tokens returns a 5-tuple, not a namedtuple:

http://docs.python.org/2/library/tokenize.html
"The generator produces 5-tuples with these members: ..."

The section you quote is talking about tokenize.tokenize, and I think that documentation should be fixed. Changing to namedtuple would be a new feature, which are not being added to 2.7.

----------
nosy: +eric.smith

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20956>
_______________________________________


More information about the Python-bugs-list mailing list