当前位置: 首页>>代码示例>>Python>>正文


Python ShareYourSystem.getIsTuplesListBool方法代码示例

本文整理汇总了Python中ShareYourSystem.getIsTuplesListBool方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.getIsTuplesListBool方法的具体用法?Python ShareYourSystem.getIsTuplesListBool怎么用?Python ShareYourSystem.getIsTuplesListBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ShareYourSystem的用法示例。


在下文中一共展示了ShareYourSystem.getIsTuplesListBool方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: do_append

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getIsTuplesListBool [as 别名]
	def do_append(self):
		""" """
		
		#debug
		'''
		self.debug('self.AppendingCollectionVariable is '+str(self.AppendingCollectionVariable))
		'''

		#TuplesList Case
		if SYS.getIsTuplesListBool(self.AppendingCollectionVariable):

			#debug
			'''
			self.debug('This is a tuples list')
			'''

			#Definition the KeyStrsList
			AppendedKeyStrsList=SYS.unzip(self.AppendingCollectionVariable,[0])

			#Look for an AppendingNodeCollectionStr
			try:
				NodeCollectionStrIndexInt=AppendedKeyStrsList.index(
					"NodeCollectionStr"
				)
				self.AppendedNodeCollectionStr=self.AppendingCollectionVariable[
					NodeCollectionStrIndexInt
				][1]
				
				'''
				#self.AppendedKeyStrKeyStr='Noded'+self.AppendedNodeCollectionStr+'KeyStr'
				try:
					AppendedKeyStrIndexInt=AppendedKeyStrsList.index(
						self.AppendedKeyStrKeyStr
					)
					self.AppendedKeyStr=self.AppendingCollectionVariable[KeyStrIndexInt][1]
				except:
					pass
				'''
				NodeKeyStrIndexInt=AppendedKeyStrsList.index(
					"NodeKeyStr"
				)
				self.AppendedNodeKeyStr=self.AppendingCollectionVariable[
					NodeKeyStrIndexInt
				][1]

			except:
				pass

		else:

			#Objects Case
			if "AppenderClass" in map(
							lambda __Class:
							__Class.__name__,
							type(self.AppendingCollectionVariable).__mro__
							):

				#debug
				'''
				self.debug('This is a derived object from an Appender')
				'''

				#set
				AppendedDict=self.AppendingCollectionVariable.__dict__

			#dict Case
			elif type(self.AppendingCollectionVariable) in [dict,collections.OrderedDict]:
				AppendedDict=self.AppendingCollectionVariable

			try:

				#set
				self.AppendedNodeCollectionStr=AppendedDict["NodeCollectionStr"]
				self.AppendedNodeKeyStr=AppendedDict[
						'NodeKeyStr'
				]
			
			except:
				pass

		#Init the SettingVariable and Add the NodifyingStr
		AppendedSettingKeyVariable=Noder.NodingPrefixGetStr+self.AppendedNodeCollectionStr+Noder.NodingSuffixGetStr+self.AppendedNodeKeyStr

		#debug
		self.debug([
						('self.',self,[
											'AppendedNodeCollectionStr',
											'AppendedNodeKeyStr'
										])
					]
				)

		#Then set
		if AppendedSettingKeyVariable!=Noder.NodingPrefixGetStr+Noder.NodingSuffixGetStr:
			self.__setitem__(
								AppendedSettingKeyVariable,
								self.AppendingCollectionVariable
							)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:100,代码来源:__init__.py

示例2: do_team

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getIsTuplesListBool [as 别名]
	def do_team(self):

		#debug
		'''
		self.debug(
			('self.',self,[
					'TeamingKeyStr',
					'TeamingValueVariable'
				])
		)
		'''

		#Check
		if self.TeamingValueVariable==None:

			#try to get
			try:

				#get
				self.TeamedValueVariable=self.TeamDict[
					self.TeamingKeyStr
				]

				#set
				self.TeamedIsBool=True
			
			except KeyError:

				#init
				self.TeamedValueVariable=self.TeamingValueClass()

				#set
				self.TeamedIsBool=False

		else:

			#init
			self.TeamedIsBool=False

			#alias
			self.TeamedValueVariable=self.TeamingValueVariable

		#Check
		if self.TeamedIsBool==False:

			#/####################/#
			# Case where it is a dict or tuples list like
			# we wrap then in a manager new object

			#Check
			if hasattr(
				self.TeamedValueVariable,
				'items'
			) or SYS.getIsTuplesListBool(self.TeamedValueVariable):

				#init
				self.TeamedValueVariable=Manager.ManagerClass(
					)['#[email protected]'](
						self.TeamedValueVariable
					)

			#set in the __dict__
			self.__setattr__(
					self.TeamingKeyStr+type(
						self.TeamedValueVariable
					).NameStr,
					self.TeamedValueVariable
				)

			#put in the dict
			self.TeamDict[
				self.TeamingKeyStr
			]=self.TeamedValueVariable

			##########################
			#give some team attributes
			#

			#debug
			'''
			self.debug(
				'We make point the teamed instance to self'
			)
			'''

			#set
			'''
			self.TeamedValueVariable.point(
					self,
					'TeamPointDeriveTeamer'
				)
			'''
			self.TeamedValueVariable.TeamPointDeriveTeamer=self
				
			#debug
			'''
			self.debug(
				'Ok it is pointed'
			)	
			'''
#.........这里部分代码省略.........
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:103,代码来源:__init__+copy+4.py

示例3: mimic_set

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getIsTuplesListBool [as 别名]
	def mimic_set(self):

		#Check
		if type(self.SettingKeyVariable)==str:

			#Check
			if self.SettingKeyVariable.startswith(ConnectGetSetPrefixStr):

				if type(
					self.SettingValueVariable
				)==list and SYS.getIsTuplesListBool(self.SettingValueVariable
				)==False and len(self.SettingValueVariable)==2:

					#debug
					'''
					self.debug(
							[
								'We set connect here',
								('self.',self,['SettingKeyVariable'])
							]
						)
					'''

					#connect
					self.connect(
							SYS.deprefix(
								self.SettingKeyVariable,
								ConnectGetSetPrefixStr
							),
							self.SettingValueVariable[0],
							self.SettingValueVariable[1]
						)

					#return
					return {'HookingIsBool':False}

				else:

					#debug
					'''
					self.debug(
							[
								'We set connect back here',
								('self.',self,['SettingKeyVariable'])
							]
						)
					'''

					#connect
					self.connect(
							SYS.deprefix(
								self.SettingKeyVariable,
								ConnectGetSetPrefixStr
							),
							self.SettingValueVariable
						) 

					#return
					return {'HookingIsBool':False}

		#set
		BaseClass.set(self)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:64,代码来源:__init__+copy+4.py

示例4: do_array

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getIsTuplesListBool [as 别名]
	def do_array(self):
		
		#debug
		'''
		self.debug(
				[
					'we array here',
					('self.',self,['ArrayingKeyVariablesList'])
				]
			)
		'''
		
		#Check
		if len(self.ArrayingKeyVariablesList)>0:

			
			#/####################/#
			# Is it going to be a set with several layers
			#

			#debug
			'''
			self.debug(
					[
						'Is it going to be a set with several layers ?',
						('self.',self,[
							'ArrayingKeyVariablesList',
							'ArrayingValueVariable'
						])
					]
				)
			'''

			#Check
			if SYS.getIsListsListBool(self.ArrayingKeyVariablesList):

				#debug
				'''
				self.debug(
					[
						'set with several layers',
						('self.',self,['ArrayingValueVariable'])
					]
				)
				'''

				#/####################/#
				# Adapt the shape of the ValueVariable
				#

				#list default
				ArrayedLocalValueVariablesList=[]
				ArrayedDeepValueVariable=[]

				#Check
				if self.ArrayingValueVariable!=None:

					#Check
					if len(
						self.ArrayingValueVariable
					)==1 and len(self.ArrayingKeyVariablesList[0])>1:

						#listify
						self.ArrayingValueVariable=[self.ArrayingValueVariable]

					#Check
					if type(self.ArrayingValueVariable)!=list:
						

						#debug
						'''
						self.debug(
							[
								'This is a total same setting',
								('self.',self,[
									'ArrayingKeyVariablesList',
									'ArrayingValueVariable'
								])
							]
						)
						'''
						
						#list
						ArrayedLocalValueVariablesList=[self.ArrayingValueVariable]*len(
							self.ArrayingKeyVariablesList[0]
						)
						ArrayedDeepValueVariable=self.ArrayingValueVariable

					elif len(self.ArrayingValueVariable)>0:

						#Check
						if SYS.getIsTuplesListBool(self.ArrayingValueVariable[0]) or hasattr(
							self.ArrayingValueVariable[0],'items'
						):

						 	#debug
						 	'''
						 	self.debug('This is an identical layered array setting')
						 	'''

#.........这里部分代码省略.........
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:103,代码来源:__init__.py

示例5: do_manage

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getIsTuplesListBool [as 别名]

#.........这里部分代码省略.........
					('self.',self,[
							'ManagingKeyStr',
							'ManagingValueRigidVariable'
						]
					),
					'Check first if this managingkey str is known'
				]
			)
			'''
			
			#Check
			if self.ManagingValueRigidVariable==None:

				#init
				self.ManagedValueVariable=self.ManagingValueClass()

			else:

				#alias
				self.ManagedValueVariable=self.ManagingValueRigidVariable

			#/####################/#
			# Case where it is a dict or tuples list like
			# we wrap then in a teamer new object and ManagingWrapBool

			#temp
			ManagedTempValueVariable=None

			#Check
			if self.ManagingWrapBool and (
				hasattr(
					self.ManagedValueVariable,
					'items'
				) or SYS.getIsTuplesListBool(self.ManagedValueVariable)
			):

				#debug
				'''
				self.debug(
						[
							'This is a manage with a value dict',
							'We wrap into an instance',
							('self.',self,[
								'ManagingKeyStr',
								'ManagingValueClass',
								'ManagingClassesDict'
								])
						]
					)
				'''

				#Check
				if self.ManagingKeyStr in self.ManagingClassesDict:

					#get
					self.ManagingValueClass=self.ManagingClassesDict[
						self.ManagingKeyStr
					]

					#debug
					'''
					self.debug(
							[
								'There is a special type for this',
								('self.',self,['ManagingValueClass'])
							]
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:70,代码来源:__init__.py

示例6: do_instance

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getIsTuplesListBool [as 别名]
	def do_instance(self):
		""" """
		
		#Check
		if self.InstancingIsBool:

			#Init
			InstancingClass=None

			#TuplesList Case
			if SYS.getIsTuplesListBool(self.InstancingVariable):

				#debug
				'''
				self.debug('This is a tuples list')
				'''

				if self.InstancingClass==None:

					#debug
					'''
					self.debug('Find the instancing class')
					'''

					#Definition the KeyStrsList
					KeyStrsList=SYS.unzip(self.InstancingVariable,[0])

					try:
						InstancingClass=self.InstancingVariable[KeyStrsList.index('InstancingClass')][1]
					except:
						pass

				else:
					InstancingClass=self.InstancingClass

				#Check
				if InstancingClass!=None:

					#Init
					self.InstancedVariable=InstancingClass()

					#Map
					map(
							lambda __ItemTuple:
							self.InstancedVariable.__setattr__(*__ItemTuple),
							self.InstancingVariable
						)

					#debug
					'''
					self.debug(('vars ',vars(),['InstancedVariable']))
					'''

			elif hasattr(self.InstancingVariable,'items'):

				#debug
				'''
				self.debug('This is an itemizing thing')
				'''

				if self.InstancingClass==None:

					#debug
					'''
					self.debug('Find the instancing class')
					'''

					try:
						InstancingClass=self.InstancingVariable['InstancingClass']
					except:
						pass
				else:

					#Definition
					InstancingClass=self.InstancingClass

				if InstancingClass!=None:

					#Init
					self.InstancedVariable=InstancingClass()

					#Map
					map(
							lambda __ItemTuple:
							self.InstancedVariable.__setattr__(*__ItemTuple),
							self.InstancingVariable.items()
						)
		
			elif hasattr(self.InstancingVariable,'__dict__'):

				#Check
				if self.InstancingClass!=None:

					#Init
					self.InstancedVariable=self.InstancingClass()
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:97,代码来源:__init__.py


注:本文中的ShareYourSystem.getIsTuplesListBool方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。