Sergei Lebedev added the comment:
> I strongly prefer that there not be inner named tuples.
Hi Raymond, do you still strongly prefer (row, col) to remain unnamed? If so,
could you comment on what makes you prefer that apart from (row, col) being
more common than (col, row)?
Are there any
Georg Brandl ge...@python.org added the comment:
Note that in tokenize.diff, TokenInfo should be in __all__ instead of
Token. I agree with Raymond on the inner tuples.
--
nosy: +georg.brandl
___
Python tracker rep...@bugs.python.org
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Committed in r72086.
Needs backporting to 2.7.
--
resolution: - fixed
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5857
New submission from Vaibhav Mallya mally...@umich.edu:
Returning an anonymous 5-tuple seems like a suboptimal interface since
it's so easy to accidentally confuse, for example, the indices of start
and end. I've used tokenize.py for several scripts in the past few weeks
and I've always ended up
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Comments on the earlier patch:
* No need for an inner row/col namedtuple. That would add little value.
* The name Token is already used in the module for a different purpose.
* The wrapper is nice looking, but it is better to
Vaibhav Mallya mally...@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
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
I strongly prefer that there not be inner named tuples. That is going
overboard. FWIW, row/col order is very common convention especially
when the row refers to a line number in a text block and column refers
to a character
Changes by Raymond Hettinger rhettin...@users.sourceforge.net:
--
assignee: - rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5857
___