-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot subtract number from iterators #1920
Comments
I must've missed the point of this section before, oops. I'd prefer not to have the `start` var, but it's necessary because I can't subtract a number from the iterator right now: zeek/spicy#1920
Hmm ... I think the docs are odd/wrong here. We do have a So with that in mind, I don't know what the docs are trying to say there. :-) We should probably replace that with some version of "use input() to remember a position, then set_input() to go back there". |
In the "Changing input" section in the docs, there is a reference that seems like it implies you can subtract some number from an iterator:
So I tried
self.set_input(self.input() - 1);
and got:which seems exactly like the docs were telling me to do, so I got a little upset.
I don't see any
iterator - uint
ish operators anywhere - was this ever supported, or intended to be supported? I'd hardly call it "typical" if it's not supported :) so either that should be added or the docs changed.But, I don't have the history of this to know which one it should be. I'd just prefer if you could subtract the number of bytes, that seems nice.
The text was updated successfully, but these errors were encountered: