|
From: | Werner LEMBERG |
Subject: | [Groff] Re: .substring bug - indicies don't work as documented(?) |
Date: | Sun, 28 Oct 2001 14:12:33 +0100 (CET) |
> Languages seem to do it all kinds of ways. > > % python > >>> s = 'abcdefg' > >>> s[1] > 'b' > >>> s[1:1] > '' > >>> s[1:2] > 'b' > >>> s[0:2] > 'ab' > >>> s[-2] > 'f' > >>> s[-2:] > 'fg' Emacs Lisp's `substring' command behaves identically. I'm more and more convinced that it is a good idea to make groff's .substring request work similar. While this is an incompatible change, it is an improvement IMHO. Any objections? Werner
[Prev in Thread] | Current Thread | [Next in Thread] |