Joel Uckelman on Fri, 3 Dec 2004 12:56:59 -0600 (CST)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [nimh-dev] More stuff


Thus spake Tom Plagge:
> > I don't understand nimh_sequence.parse_sequence(). Why are you splitting on
>  
> > commas? There shouldn't be any commas in a sequence.
> 
> You can't do "show 5,6,8-25" ?  It seems like you should be able to.

You can, it's just that it's space-delimited: show 5 6 8-25

> > Also, your test for ranges won't work if the range contains a non-numeric 
> > message name. Were you intending that ranges be completely validated in 
> > parse_sequence?
> 
> Yeah, I've basically set that up to add by putting in a folder.get_last_messa
> ge
> and folder.get_cur_message and so on, but I didn't add the functionality 
> because it seemed like you had a better feel for sequence parsing than I did.
> -t

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.

-- 
J.


_______________________________________________
nimh-dev mailing list
nimh-dev@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/nimh-dev