[issue3028] tokenize module: normal lines, not logical

2008-06-03 Thread Senthil

Senthil [EMAIL PROTECTED] added the comment:

 The documentation of the tokenize module says: The line passed is the
 *logical* line; continuation lines are included.
 
 I suggest that this will be changed to something like The line passed
 is the index of the string returned by the readline function, plus 1.
 That is, the first string returned is called line 1, the second is
 called line 2, and so on.

The emphasis of *logical* may help us understand that it is a complete line.

I find the wording of solution bit awkward, tough I am able to get what it is
trying to say.

- Index of string returned by readline function ??  and plus 1. ??

How about, 

The line passed is the *logical* non-blank line; continuation lines are 
included.
The row counting starts from one.

--
nosy: +orsenthil

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3028
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue3028] tokenize module: normal lines, not logical

2008-06-02 Thread Noam Raphael

New submission from Noam Raphael [EMAIL PROTECTED]:

Hello,

The documentation of the tokenize module says: The line passed is the
*logical* line; continuation lines are included.

Some background: The tokenize module splits a python source into tokens,
and says for each token where it begins and where it ends, in the format
of (row, offset). This note in the documentation made me think that
continuation lines are considered as one line, and made me break my head
how I should find the offset of the token in the original string. The
truth is that the row number is simply the index of the line as returned
by the readline function, and it's very simple to reconstruct the string
offset.

I suggest that this will be changed to something like The line passed
is the index of the string returned by the readline function, plus 1.
That is, the first string returned is called line 1, the second is
called line 2, and so on.

Thanks,
Noam

--
assignee: georg.brandl
components: Documentation
messages: 67635
nosy: georg.brandl, noam
severity: normal
status: open
title: tokenize module: normal lines, not logical
versions: Python 2.5

___
Python tracker [EMAIL PROTECTED]
http://bugs.python.org/issue3028
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com