[Bro-Dev] #422: Array-style index accessor for strings
Bro Tracker
bro at tracker.bro-ids.org
Fri Dec 21 09:01:09 PST 2012
#422: Array-style index accessor for strings
----------------------------+----------------------
Reporter: seth | Owner: robin
Type: Merge Request | Status: closed
Priority: Normal | Milestone: Bro2.2
Component: Bro | Version:
Resolution: fixed | Keywords: language
----------------------------+----------------------
Comment (by matthias):
Replying to [comment:4 robin]:
> Merging, but what would you guys think about {{{s[1:4]}}} instead of
{{{s[1,4]}}} (i.e., Pythonian)?
I prefer the `s[1,4]` syntax, as I find it more consistent with the
language at this point. We currently do not have the notion of a "range".
Once we do, it would make sense to apply this concept to any enumerable
types, like containers. Then "`range(1, 4)`" can have some sort of
syntactic sugar (for Rubyists, that would be `1..4` and for the Pythonians
`1:4`, so there's room for discussion :-).
--
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/422#comment:8>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker
More information about the bro-dev
mailing list