<s> """<STR_LIT>""" <EOL> import sys <EOL> import dns . exception <EOL> class _SliceUnspecifiedBound ( str ) : <EOL> def __getslice__ ( self , i , j ) : <EOL> return j <EOL> _unspecified_bound = _SliceUnspecifiedBound ( '<STR_LIT>' ) [ <NUM_LIT:1> : ] <EOL> class WireData ( str ) : <EOL> def __getitem__ ( self , key ) : <EOL> try : <EOL> return WireData ( super ( WireData , self ) . __getitem__ ( key ) ) <EOL> except IndexError : <EOL> raise dns . exception . FormError <EOL> def __getslice__ ( self , i , j ) : <EOL> try : <EOL> if j == _unspecified_bound : <EOL> j = len ( self ) <EOL> if i < <NUM_LIT:0> or j < <NUM_LIT:0> : <EOL> raise dns . exception . FormError <EOL> if i != j : <EOL> super ( WireData , self ) . __getitem__ ( i ) <EOL> super ( WireData , self ) . __getitem__ ( j - <NUM_LIT:1> ) <EOL> return WireData ( super ( WireData , self ) . __getslice__ ( i , j ) ) <EOL> except IndexError : <EOL> raise dns . exception . FormError <EOL> def __iter__ ( self ) : <EOL> i = <NUM_LIT:0> <EOL> while <NUM_LIT:1> : <EOL> try : <EOL> yield self [ i ] <EOL> i += <NUM_LIT:1> <EOL> except dns . exception . FormError : <EOL> raise StopIteration <EOL> def unwrap ( self ) : <EOL> return str ( self ) <EOL> def maybe_wrap ( wire ) : <EOL> if not isinstance ( wire , WireData ) : <EOL> return WireData ( wire ) <EOL> else : <EOL> return wire </s>
