Re: Automated indentation

Tim Peters (
Mon, 09 May 94 18:33:52 -0400

> [john describes an older scheme, that has pymode stuff "# END" tokens
> in the bodies of blocks as a side-effect of closing them with DEL,
> like ...]
> ...
> def read(name):
> if posixpath.isfile(name):
> f = open(name,'r')
> db = marshal.load(f)
> f.close()
> return db
> # END
> else:
> return {}
> # END
> # END
> def write(db,name):
> f = open(name,'w')
> marshal.dump(db, f)
> f.close()
> # END
> ...
> If people want this, then pester Tim to add it to py-mode. (Tim, I
> assume you still have the diff I posted. I havent mangled the new
> py-mode yet.)

Yup, I still have the mod. It requires more work to fit in smoothly with
_all_ of pymode's features, though, and since I personally (a) have no
problem with Python today, and (b) dislike the looks of this, wouldn't
put it in unconditionally in any case.

If people who want block-closers can agree on a specific scheme, I'll
volunteer the time to fiddle pymode accordingly afterward. But since I'm
not interested in it myself, I'm not volunteering time to debate the
merits of competing schemes. Well, one point: a scheme that can't deal
with a Python program presented as a single long newline-free string
doesn't achieve all the things block-closers _should_ achieve.

talk-about-quick-'n-dirty-hacks<wink>-ly y'rs - tim

Tim Peters
not speaking for Kendall Square Research Corp