Message45787
| Author |
noamr |
| Recipients |
| Date |
2005年10月09日.22:57:58 |
| SpamBayes Score |
| Marked as misclassified |
| Message-id |
| In-reply-to |
| Content |
Logged In: YES
user_id=679426
It's an optimization: If we scroll up, we know that there
can't be a new context line with a smaller indentation than
that of the deleted context lines, so it lets us stop
searching sooner.
For example, take this class:
class Babonag(object):
# This is a big class, and a lot of methods are defined
here...
def ping():
print "ping"
def pong():
pring "pong"
Now say we scroll up: the first line was 'print "pong"', and
it is now 'print "ping"'. If we use stopindent, we know that
we can stop immediately after we have reached "def ping",
because we know that there can't be a line with a smaller
indentation than that. If we don't, we have to scan up to
"class Babonag" to be certain that there aren't any extra
context lines.
(By the way, well done for the tweaked comments docstrings
and names. They seem a lot cleaner.)
Noam |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年08月23日 15:37:14 | admin | link | issue936169 messages |
| 2007年08月23日 15:37:14 | admin | create |
|