[Zope] Best Zope way to split a textfield on 2000 char increments

Jerome Alet alet@unice.fr
Fri, 15 Dec 2000 16:16:59 +0100 (MET)


On Fri, 15 Dec 2000, Steve Drees wrote:

> somestring[:1999] is the first 2000 characters of somestring.

Not to be a poseur but:

somestring[:1999] is the first 1999 characters of somestring, because
in Python indices begin at 0, e.g.:

a="0123"
print a[:3] gives "012" which are the first 3 characters from a.

bye,

Jerome Alet