<s> """<STR_LIT>""" <EOL> class Code ( str ) : <EOL> """<STR_LIT>""" <EOL> _type_marker = <NUM_LIT> <EOL> def __new__ ( cls , code , scope = None , ** kwargs ) : <EOL> if not isinstance ( code , basestring ) : <EOL> raise TypeError ( "<STR_LIT>" <EOL> "<STR_LIT>" % ( basestring . __name__ , ) ) <EOL> self = str . __new__ ( cls , code ) <EOL> try : <EOL> self . __scope = code . scope <EOL> except AttributeError : <EOL> self . __scope = { } <EOL> if scope is not None : <EOL> if not isinstance ( scope , dict ) : <EOL> raise TypeError ( "<STR_LIT>" ) <EOL> self . __scope . update ( scope ) <EOL> self . __scope . update ( kwargs ) <EOL> return self <EOL> @ property <EOL> def scope ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . __scope <EOL> def __repr__ ( self ) : <EOL> return "<STR_LIT>" % ( str . __repr__ ( self ) , self . __scope ) <EOL> def __eq__ ( self , other ) : <EOL> if isinstance ( other , Code ) : <EOL> return ( self . __scope , str ( self ) ) == ( other . __scope , str ( other ) ) <EOL> return False <EOL> def __ne__ ( self , other ) : <EOL> return not self == other </s>
