コード例 #1
0
 def delete(self, arguments):
     'Get the delete list.'
     deleteList = []
     enumeratorSet = set(euclidean.getEnumeratorKeysAlwaysList(self.listObject, arguments))
     for elementIndex, element in enumerate(self.listObject):
         if elementIndex not in enumeratorSet:
             deleteList.append(element)
     return deleteList
コード例 #2
0
ファイル: string_attribute.py プロジェクト: mezl/ReplicatorG
 def delete(self, arguments):
     "Get the delete string."
     deleteString = ""
     enumeratorSet = set(euclidean.getEnumeratorKeysAlwaysList(self.stringObject, arguments))
     for characterIndex, character in enumerate(self.stringObject):
         if characterIndex not in enumeratorSet:
             deleteString += character
     return deleteString
コード例 #3
0
	def delete(self, arguments):
		'Get the delete string.'
		deleteString = ''
		enumeratorSet = set(euclidean.getEnumeratorKeysAlwaysList(self.stringObject, arguments))
		for characterIndex, character in enumerate(self.stringObject):
			if characterIndex not in enumeratorSet:
				deleteString += character
		return deleteString
コード例 #4
0
	def delete(self, arguments):
		'Get the delete dictionary.'
		if arguments.__class__ != list:
			del self.dictionaryObject[arguments]
			return self.dictionaryObject
		if len(arguments) == 0:
			self.dictionaryObject.clear()
			return self.dictionaryObject
		if len(arguments) == 1:
			del self.dictionaryObject[arguments[0]]
			return self.dictionaryObject
		for enumeratorKey in euclidean.getEnumeratorKeysAlwaysList(self.dictionaryObject, arguments):
			del self.dictionaryObject[enumeratorKey]
		return self.dictionaryObject
コード例 #5
0
 def delete(self, arguments):
     'Get the delete dictionary.'
     if arguments.__class__ != list:
         del self.dictionaryObject[arguments]
         return self.dictionaryObject
     if len(arguments) == 0:
         self.dictionaryObject.clear()
         return self.dictionaryObject
     if len(arguments) == 1:
         del self.dictionaryObject[arguments[0]]
         return self.dictionaryObject
     for enumeratorKey in euclidean.getEnumeratorKeysAlwaysList(
             self.dictionaryObject, arguments):
         del self.dictionaryObject[enumeratorKey]
     return self.dictionaryObject