| Tom Plagge on Fri, 3 Dec 2004 13:13:56 -0600 (CST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: [nimh-dev] More stuff |
I think this is a very good idea. A similar idea would work well in the folder class. And you're right, it should have been space delimited; that was my mistake. > > Oh, ok. Well, it might make sense to validate but not explode sequences. > > Say I have a folder with 10k messages in it, and I do 'scan 1-10000'. I'm > > not sure that we should create an array with 10k elements at parse-time. > > Anything which needs the actual message numbers can just call > > sequence.message_numbers(), and the expansion could be done then. > > > As far as implementation goes, a generator/iterator type of function would > be a good idea. Each time you call it, the function evaluates lazily and > returns the next message item. Kind of a high-level functional technique, > so there's some overhead, but it is scalable. We could also use it, in the > future, to define infinite sequences, filtering, etc. ________________________________________________________________________ Tom Plagge UC Berkeley Physics Dept. 351 LeConte Hall Voice: (510) 643-1650 Berkeley, CA 94720 Email: tplagge@xxxxxxxxxxxxxxxxx ________________________________________________________________________ _______________________________________________ nimh-dev mailing list nimh-dev@xxxxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/nimh-dev