how to refer to partial list, slice is too slow?

=?gb2312?B?yMvR1MLkyNXKx8zs0cSjrM37vKvM7NHEsru8+7zS?= kelvin.you at gmail.com
Fri May 11 07:56:11 CEST 2007


I make a sample here for the more clearly explanation

s = " ..... - this is a large string data - ......."

def parser1(data)
     # do some parser
     ...
     # pass the remainder to next parser
     parser2(data[100:])

def parser2(data)
     # do some parser
     ...
     # pass the remainder to next parser
     parser3(data[100:])

def parser3(data)
     # do some parser
     ...
     # pass the remainder to next parser
     parser4(data[100:])

...




More information about the Python-list mailing list