P
Paddy
Lets say i have a generator running that generates successive
characters of a 'string'
characters so far to re.search.
It is expensive to create successive characters, but caching could be
used for past characters. is it possible to wrap the generator in a
class, possibly inheriting from string, that would allow the regexp
searching of the string but without terminating the generator? In
other words duck typing for the usual string object needed by
re.search?
- Paddy.
characters of a 'string'
characters then I would have to 'freeze' the generator and pass theFrom what I know, if I want to do a regexp search for a pattern of
characters so far to re.search.
It is expensive to create successive characters, but caching could be
used for past characters. is it possible to wrap the generator in a
class, possibly inheriting from string, that would allow the regexp
searching of the string but without terminating the generator? In
other words duck typing for the usual string object needed by
re.search?
- Paddy.