[ZPT] Batching and sequence-index ?

Steve Spicklemire steve@spvi.com
Wed, 5 Sep 2001 04:57:55 -0500


Hi Geir,

from Batch.py:

     def __getitem__(self, index):
         if index < 0:
             if index + self.end < self.first: raise IndexError, index
             return self._sequence[index + self.end]

         if index >=3D self.size: raise IndexError, index
         return self._sequence[index+self.first]

Looks like you want  "path('repeat/yourvar/index') +=20
whatYouUsedAsStart - 1"

or even better

"path('repeat/yourvar/index') + batchObject.first"

The Batch object doesn't seem to store this anywhere handy.

-steve

On Wednesday, September 5, 2001, at 04:03 AM, Geir B=E6kholt wrote:

>
> Does the Batch-module of ZTUtils return something similar to=20
> sequence-number or
> sequence-index??
>
> I seem to be able to whatever else i want , but i cannot find any
> reference to a variable telling me where in the sequence i am...
>
> --
> Geir B=E6kholt                   web-developer/zopatista
> geirh@funcom.com             funcom oslo | webdev-team
>
>             <!-- PGPid : 0x90B47B20 -->
>
>
> _______________________________________________
> ZPT mailing list
> ZPT@zope.org
> http://lists.zope.org/mailman/listinfo/zpt