#NEWLINE# def __init__( self , string_chunks ) : #NEWLINE# #INDENT# def flatten( chunks ) : #NEWLINE# #INDENT# if ( type ( chunks ) == str ) : #NEWLINE# #INDENT# return chunks #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# chunk_strings = [ ] #NEWLINE# for chunk in chunks : #NEWLINE# #INDENT# chunk_strings . append ( flatten ( chunk ) ) #NEWLINE# #UNINDENT# return '' . join ( chunk_strings ) #NEWLINE# #UNINDENT# #UNINDENT# self . __data = flatten ( string_chunks ) #NEWLINE# self . __index = 0 #NEWLINE# self . __length = len ( self . __data )