Re: [Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-25 Thread Tino Wildenhain
Am Sonntag, den 24.07.2005, 19:50 -0300 schrieb David Pratt: Hi Chris. I believe the purpose of ZTUtils are utility functions for page templating. That said, the Iterator class could be more useful by exposing its values based on its state - the point I had made. Versatility is the

Re: [Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-25 Thread David Pratt
New methods on the iterator would do the trick. I had suggested currval and nextval or similar - two or three simple methods would increase the versatility of the Iterator class for a variety of things. Is there interest in adding new methods to ZTUtils to expose these values? It seems to

Re: [Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-24 Thread Chris Withers
David Pratt wrote: Ah, I see what you're after, something akin to an SQL sequence, right? Well, Iterator ain't that ;-) I guess something like that but that is what an iterator does. Why makes you think ZTUtils Iterators were designed for this? Well, by hand is not the solution either.

Re: [Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-24 Thread David Pratt
Hi Chris. I believe the purpose of ZTUtils are utility functions for page templating. That said, the Iterator class could be more useful by exposing its values based on its state - the point I had made. Versatility is the beautiful thing about python - it rarely matters to me what intention

Re: [Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-21 Thread Chris Withers
David Pratt wrote: Thanks Tres. The 1's are explained for sure but I can't see a always doing the job for this. What I need is an object that keeps track of the last number given to it so it will supply the next based on its state. For use in a flat form with say a dozen fields you are not

Re: [Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-21 Thread David Pratt
Ah, I see what you're after, something akin to an SQL sequence, right? Well, Iterator ain't that ;-) Hi Chris I guess something like that but that is what an iterator does. ZTUtils just doesn't provide a method to get the values out of it (which it could if the methods were available).

[Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-20 Thread Tres Seaver
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David Pratt wrote: Hi Chris. Thanks for your reply. My understanding (which may be flawed) is that ZTUtils iterator provides values of a sequence as you iterate over them with a repeat statement. I believe what I am trying to do is sensible. I

[Zope] Re: ZTUtils.Iterator value in ZPT

2005-07-20 Thread David Pratt
Thanks Tres. The 1's are explained for sure but I can't see a always doing the job for this. What I need is an object that keeps track of the last number given to it so it will supply the next based on its state. For use in a flat form with say a dozen fields you are not repeating over each