[issue5857] Return namedtuples from tokenize token generator

Vaibhav Mallya report at bugs.python.org
Mon Apr 27 23:50:04 CEST 2009


Vaibhav Mallya <mallyvai at umich.edu> added the comment:

Well, the reason I put in the inner row/col namedtuple initially was
because the first mistake I made with the original module was mixing up
the row/col indices for a particular case. It certainly caused all sorts
of weird headaches. :o)

I mean, it seems like there's no real reason it "should" be (row,col)
instead of (col,row) in the returned tuple; that is, it feels like the
ordering is arbitrary in and of itself.

I really feel that allowing for start.row and start.col would make the
interface completely explicit and valid semantically.

Agreed with the other two points, however.

Also, I take it there's going to be a need for an addendum to the test
suite, since the interface is being modified?

----------

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


More information about the Python-bugs-list mailing list