<s> """<STR_LIT>""" <EOL> from pyherc . aspects import log_debug <EOL> class Inventory ( ) : <EOL> """<STR_LIT>""" <EOL> @ log_debug <EOL> def __init__ ( self ) : <EOL> """<STR_LIT>""" <EOL> super ( ) . __init__ ( ) <EOL> self . __items = [ ] <EOL> self . ring = None <EOL> self . weapon = None <EOL> self . gloves = None <EOL> self . boots = None <EOL> self . belt = None <EOL> self . helm = None <EOL> self . necklace = None <EOL> self . projectiles = None <EOL> self . shield = None <EOL> self . armour = None <EOL> @ log_debug <EOL> def __len__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return len ( self . __items ) <EOL> @ log_debug <EOL> def __getitem__ ( self , key ) : <EOL> """<STR_LIT>""" <EOL> return self . __items . __getitem__ ( key ) <EOL> @ log_debug <EOL> def __setitem__ ( self , key , value ) : <EOL> """<STR_LIT>""" <EOL> self . __items . __setitem__ ( key , value ) <EOL> @ log_debug <EOL> def __delitem__ ( self , key ) : <EOL> """<STR_LIT>""" <EOL> item = self . __items [ key ] <EOL> self . remove ( item ) <EOL> @ log_debug <EOL> def __iter__ ( self ) : <EOL> """<STR_LIT>""" <EOL> return self . __items . __iter__ ( ) <EOL> @ log_debug <EOL> def append ( self , item ) : <EOL> """<STR_LIT>""" <EOL> self . __items . append ( item ) <EOL> @ log_debug <EOL> def remove ( self , item ) : <EOL> """<STR_LIT>""" <EOL> self . __items . remove ( item ) <EOL> if item == self . weapon : <EOL> self . weapon = None <EOL> if item == self . armour : <EOL> self . armour = None <EOL> if item == self . projectiles : <EOL> self . projectiles = None <EOL> if item == self . boots : <EOL> self . boots = None <EOL> def _repr_pretty_ ( self , p , cycle ) : <EOL> """<STR_LIT>""" <EOL> if cycle : <EOL> p . text ( '<STR_LIT>' ) <EOL> else : <EOL> p . text ( '<STR_LIT>' ) <EOL> for item in self . __items : <EOL> p . pretty ( item ) <EOL> p . breakable ( ) </s>
