#NEWLINE# def RemoveAddressFromList( superset , exclude ) : #NEWLINE# #INDENT# 'Remove a single address from a list of addresses.\n\n  Args:\n    superset: a List of nacaddr IPv4 or IPv6 addresses\n    exclude: a single nacaddr IPv4 or IPv6 address\n\n  Returns:\n    a List of nacaddr IPv4 or IPv6 addresses\n  ' #NEWLINE# ret_array = [ ] #NEWLINE# for addr in superset : #NEWLINE# #INDENT# if ( ( exclude == addr ) or ( addr in exclude ) ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( ( exclude . version == addr . version ) and ( superset in addr ) ) : #NEWLINE# #INDENT# ret_array . extend ( [ IP ( x ) for x in addr . AddressExclude ( exclude ) ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ret_array . append ( addr ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return ret_array