<s> from __future__ import unicode_literals <EOL> import copy <EOL> from . channel import Channel <EOL> class Message ( object ) : <EOL> """<STR_LIT>""" <EOL> def __init__ ( self , content , channel_name , channel_layer ) : <EOL> self . content = content <EOL> self . channel = Channel ( <EOL> channel_name , <EOL> channel_layer = channel_layer , <EOL> ) <EOL> self . channel_layer = channel_layer <EOL> if content . get ( "<STR_LIT>" , None ) : <EOL> self . reply_channel = Channel ( <EOL> content [ "<STR_LIT>" ] , <EOL> channel_layer = self . channel_layer , <EOL> ) <EOL> else : <EOL> self . reply_channel = None <EOL> def __getitem__ ( self , key ) : <EOL> return self . content [ key ] <EOL> def __setitem__ ( self , key , value ) : <EOL> self . content [ key ] = value <EOL> def __contains__ ( self , key ) : <EOL> return key in self . content <EOL> def get ( self , key , default = None ) : <EOL> return self . content . get ( key , default ) <EOL> def copy ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . __class__ ( <EOL> copy . deepcopy ( self . content ) , <EOL> self . channel . name , <EOL> self . channel_layer , <EOL> ) </s>
