diff options
author | Barry Warsaw <barry@python.org> | 1998-01-20 22:52:56 +0000 |
---|---|---|
committer | Barry Warsaw <barry@python.org> | 1998-01-20 22:52:56 +0000 |
commit | c210e69981f2fbacfe72d04df4a3b8f2306b8f33 (patch) | |
tree | bc85d4143082eb0255e740185d8a4e553b6f7054 /Python/pythonmain.c | |
parent | c0ecb53194c5835bf355e5ddfc17524bd477e476 (diff) | |
download | cpython-git-c210e69981f2fbacfe72d04df4a3b8f2306b8f33.tar.gz |
(py-compute-indentation): In the most common case, where indentation
is based on the line above, watch out for landing inside a triple
quoted string. In this case, use iterative search +
parse-partial-sexp backwards to find the beginning of the string.
Note this does affect performance, but very little in the common cases
(I hope). It could be made *much* faster by adding Emacs and XEmacs
dependent code -- different code naturally. :-(
Fixes the following reported bug:
if len(sys.argv) >= 6:
# More lines here
fptr = open('/etc/hosts', 'w')
fptr.write("""# /etc/hosts -- autocreated by /etc/ppp/ip-up
#
# Address from pppd
%-15s %s
# For loopbacking
127.0.0.1 localhost
255.255.255.255 broadcast
""" % (ipaddr, ipname) )
os.chmod('/etc/hosts', 0644)
Diffstat (limited to 'Python/pythonmain.c')
0 files changed, 0 insertions, 0 deletions