Exemplo n.º 1
0
	def getMapLambdaList(self,_SettingValueVariable):

		#debug
		'''
		self.debug(
			[
				'This is a lambda map set',
				'_SettingValueVariable is ',
				SYS._str(_SettingValueVariable)
			]
		)
		'''

		#get
		try:
			SettedTextValueVariable=_SettingValueVariable[SetValueLambdaGrabStr]
		except:
			SettedTextValueVariable=_SettingValueVariable[SetLiargLambdaGrabStr]

		#Check
		if SetMapKeyStr in _SettingValueVariable:

			#get
			SettedMapVariablesList=_SettingValueVariable[SetMapKeyStr]

		elif Getter.GetMapStr in _SettingValueVariable:

			#get
			SettedMapVariablesList=self[Getter.GetMapStr](
				*_SettingValueVariable[Getter.GetMapStr]
			).ItemizedMapValueVariablesList
			
		#debug
		'''
		self.debug(
			[
				'SettedTextValueVariable is ',
				SYS._str(SettedTextValueVariable),
				'SettedMapVariablesList is ',
				SYS._str(SettedMapVariablesList),

			]
		)
		'''

		#mapReplace
		SettedReplaceValueVariablesList=SYS.mapReplace(
			copy.copy(SettedTextValueVariable),
			SettedMapVariablesList,
			self
		)

		#debug
		'''
		self.debug(
				[
					'We have mapReplaced',
					'SettedReplaceValueVariablesList is ',
					SYS._str(SettedReplaceValueVariablesList)
				]
			)
		'''

		#return
		return SettedReplaceValueVariablesList
	)
)


#print with recursive dict set
print('\nThe mapReplace gives')
SYS._print(
	SYS.mapReplace(
			{
				'MyStr':"#BonjourStr Erwan #EndStr",
				'MyInt':'#MyInt',
				'MyTotalInt':'#get:>>#MyInt+2',
				'MyDict':{
					'MyStr':'#BonjourStr'
					}
			},
			[
				['#BonjourStr','#EndStr','#MyInt'],
				[
					['Salut','!',1],
					['Hello','?',5]
				]
			],
			SYS.PointerClass()
		)
	)

#print with recursive list set
print('\nThe mapReplace gives')
SYS._print(
	SYS.mapReplace(
		{