Am 21.09.2010 20:27, schrieb Barry Warsaw:
On Sep 21, 2010, at 10:33 AM, Andreas Röhler wrote:

suggest to drop the second sentence in doku of
`py-goto-initial-line'  --see below-- as it's confusing.

"Usually this is the line we're on" might be true, but
has no syntactic relevance.

It's not obvious, what "a continuation block" should mean.

For me a block is the body of a conditional.
Well, almost the entire docstring makes no sense<wink>.

The Python language reference describes these things as "compound statements":

     http://docs.python.org/reference/compound_stmts.html

It goes on to describe the layout of compound statements:

     "Compound statements consist of one or more ‘clauses.’ A clause consists
     of a header and a ‘suite.’ The clause headers of a particular compound
     statement are all at the same indentation level. Each clause header begins
     with a uniquely identifying keyword and ends with a colon. A suite is a
     group of statements controlled by a clause. A suite can be one or more
     semicolon-separated simple statements on the same line as the header,
     following the header’s colon, or it can be one or more indented statements
     on subsequent lines. [...]"

So, how's this for a suggested new docstring:

   "Go to the initial line of the current statement.
When point is on a simple statement, this will go to the start of that line.
When point is on a line inside a compound statement, this will go to the line
that introduces the suite, i.e. the clause header."

If you wanted, you could also add a reference to the online docs for compound
statements given above.

-Barry


Thanks,

if the lp:~a-roehler/python-mode/tqs-302834-amend <https://code.launchpad.net/%7Ea-roehler/python-mode/tqs-302834-amend> branch is merged (?)

the patch from
lp:~a-roehler/python-mode/py-goto-initial-line <https://code.launchpad.net/%7Ea-roehler/python-mode/py-goto-initial-line>
should work for you.

So I'll take care of the doku with this new head, send another patch then.

Andreas



_______________________________________________
Python-mode mailing list
Python-mode@python.org
http://mail.python.org/mailman/listinfo/python-mode

Reply via email to