#NEWLINE# @ property #NEWLINE# def string( self ) : #NEWLINE# #INDENT# "Convenience property to get the single string within this tag.\n\n        :Return: If this tag has a single string child, return value\n         is that string. If this tag has no children, or more than one\n         child, return value is None. If this tag has one child tag,\n         return value is the 'string' attribute of the child tag,\n         recursively.\n        " #NEWLINE# if ( len ( self . contents ) != 1 ) : #NEWLINE# #INDENT# return None #NEWLINE# #UNINDENT# child = self . contents [ 0 ] #NEWLINE# if isinstance ( child , NavigableString ) : #NEWLINE# #INDENT# return child #NEWLINE# #UNINDENT# return child . string