#NEWLINE# def update( self , username , password ) : #NEWLINE# #INDENT# 'Replace the entry for the given user, or add it if new.' #NEWLINE# pwhash = crypt ( password , salt ( ) ) #NEWLINE# matching_entries = [ entry for entry in self . entries if ( entry [ 0 ] == username ) ] #NEWLINE# if entry : #NEWLINE# #INDENT# matching_entries [ 0 ] [ 1 ] = pwhash #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . entries . append ( [ username , pwhash ] )