def ElementWithReading(tag, text, reading=False):
 if (text is None):
  readingText = ''
 elif isinstance(text, basestring):
  readingText = text
 else:
  readingText = text[1]
  text = text[0]
 if (not reading):
  readingText = ''
 return ElementWithText(tag, text, reading=readingText)

def ElementWithReading ( tag , text , reading = False ) : if ( text is None ) : readingText = '' elif isinstance ( text , basestring ) : readingText = text else : readingText = text [ 1 ] text = text [ 0 ] if ( not reading ) : readingText = '' return ElementWithText ( tag , text , reading = readingText )
a helper function that creates reading attributes .