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


Python ShareYourSystem.groupby方法代码示例

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


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

示例1: len

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import groupby [as 别名]
				DoneKwargTuplesList=map(
										lambda __KwargTuple:
										(
											DoingStr+DoingPrefixStr.join(
											__KwargTuple[0].split(DoingPrefixStr)[1:]),
											__KwargTuple[1]
										) if __KwargTuple[0].startswith(DoingPrefixStr)
										else __KwargTuple,
										_KwargVariablesDict.items()
									)

				#Check
				if len(DoneKwargTuplesList)>0:

					#group by
					[DoClass.DoneAttributeTuplesList,DoClass.DoneNotAttributeTupleItemsList]=SYS.groupby(
						lambda __AttributeTuple:
						hasattr(_InstanceVariable,__AttributeTuple[0]),
						DoneKwargTuplesList
					)

					#set in the instance the corresponding kwarged arguments
					map(	
							lambda __AttributeTuple:
							#set direct explicit attributes
							_InstanceVariable.__setattr__(*__AttributeTuple),
							DoClass.DoneAttributeTuplesList
						)

					#Define
					DoneKwargDict=dict(DoClass.DoneNotAttributeTupleItemsList)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:33,代码来源:__init__OOO.py

示例2: imitateDo

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import groupby [as 别名]
		def imitateDo(_InstanceVariable,*_LiargVariablesList,**_KwargVariablesDict):
			
			#Debug
			'''
			print('Imitater l.93 inside of the function imitateDo')
			print('_InstanceVariable is ',_InstanceVariable)
			print('_LiargVariablesList is ',_LiargVariablesList)
			print('_KwargVariablesDict is ',_KwargVariablesDict)
			print('')
			'''

			if len(_KwargVariablesDict)>0:

				#group by
				[ImitatedItemTuplesList,ImitatedNotItemTuplesList]=SYS.groupby(
					lambda __ItemTuple:hasattr(_InstanceVariable,__ItemTuple[0]),
					_KwargVariablesDict.items()
				)

				#Debug
				'''
				print('ImitatedItemTuplesList is ',ImitatedItemTuplesList)
				print('ImitatedNotItemTuplesList is ',ImitatedNotItemTuplesList)
				print('')
				'''

				#set in the instance the corresponding kwarged arguments
				map(	
						lambda __ItemTuple:
						#set direct explicit attributes
						_InstanceVariable.__setattr__(*__ItemTuple),
						ImitatedItemTuplesList
					)

				#Define
				ImitatedKwargDict=dict(ImitatedNotItemTuplesList)

			else:

				#Define
				ImitatedKwargDict={}

			#Init
			ImitatedOutputVariable=None

			#Debug
			'''
			print('l.141 Imitater')
			print('self.ImitatingFunction is ',self.ImitatingFunction)
			print('ImitatedKwargDict is ',ImitatedKwargDict)
			print('')
			'''
			
			#call the imitated function
			if len(ImitatedKwargDict)>0:
				ImitatedOutputVariable=self.ImitatingFunction(
									_InstanceVariable,
									*_LiargVariablesList,
									**ImitatedKwargDict
								)
			else:
				ImitatedOutputVariable=self.ImitatingFunction(
						_InstanceVariable,
						*_LiargVariablesList
						)

			#Check
			if ImitatedClass.DoingGetBool==False:

				#Return 
				return _InstanceVariable
			
			else:

				#Return the 
				return ImitatedOutputVariable
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:78,代码来源:__init__.py

示例3: len

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import groupby [as 别名]
			DoingStr+DoingAttributePrefixStr.join(
			__KwargTuple[0].split(DoingAttributePrefixStr)[1:]),
			__KwargTuple[1]
		) if __KwargTuple[0].startswith(DoingAttributePrefixStr)
		else __KwargTuple,
		_KwargVariablesDict.items()
	)

	#Check
	if len(DoKwargTuplesList)>0:

		#group by
		[
			DoClass.DoTempAttributeItemTuplesList,
			DoClass.DoTempNotAttributeItemTupleItemsList
		]=SYS.groupby(
			lambda __DoKwargTuple:
			hasattr(_InstanceVariable,__DoKwargTuple[0]),
			DoKwargTuplesList
		)

		#set in the instance the corresponding kwarged arguments
		map(	
				lambda __DoTempAttributeItemTuple:
				#set direct explicit attributes
				_InstanceVariable.__setattr__(*__DoTempAttributeItemTuple),
				DoClass.DoTempAttributeItemTuplesList
			)

		#Define
		DoneKwargDict=dict(DoClass.DoTempNotAttributeItemTupleItemsList)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:33,代码来源:__init__+copy+3.py

示例4: do_scriptbook

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

		#debug
		self.debug(
			[
				'We scriptbook here',
				('self.',self,[
					'FolderedDirKeyStrsList'
				])
			]
		)

		#Definition
		self.ScriptbookedFileKeyStrsList=SYS._filter(
				lambda __DirKeyStr:
				any(
					map(
						lambda __ExtensionStr:
						__DirKeyStr.endswith(
							self.GuidingBookStr+__ExtensionStr
						),
						['.py','.md','.tex']
				)),
				self.FolderedDirKeyStrsList
		)

		#debug
		'''
		self.debug(
			[
				('self.',self,[
						'ScriptbookedFileKeyStrsList'
					])
			]
		)
		'''
		
		#Definition
		ScriptbookedPageStrsList=map(
			lambda __ScriptbookerScriptbookFileKeyStr:
			Guider.GuidingSortStr.join(
				__ScriptbookerScriptbookFileKeyStr.split(
					Guider.GuidingSortStr)[1:]
				),
			self.ScriptbookedFileKeyStrsList
		)

		#set
		self.ScriptbookedSortDict=dict(
				zip(
						ScriptbookedPageStrsList,
						self.ScriptbookedFileKeyStrsList
					)
			)

		#debug
		'''
		self.debug(('self.',self,['ScriptbookedSortDict']))
		'''
		
		#Check
		if len(self.ScriptbookingGuideTuplesList)>0:

			#map
			ScriptbookedGuideTuplesList=map(
					lambda __ScriptbookingGuideTuple:
					list(__ScriptbookingGuideTuple)+[
						__ScriptbookingGuideTuple[1]+self.GuidingBookStr+dict(
						Guider.GuideFormatTuplesList
						)[
							__ScriptbookingGuideTuple[2]
						]
					],
					self.ScriptbookingGuideTuplesList
				)

			#groupby
			[
				self.ScriptbookedNewGuideTuplesList,
				self.ScriptbookedOldGuideTuplesList
			]=SYS.groupby(
				lambda __ScriptbookedGuideTuple:
				__ScriptbookedGuideTuple[3] not in self.ScriptbookedSortDict,
				ScriptbookedGuideTuplesList
			)

			#debug
			'''
			self.debug(
				[
					('self.',self,[
							'ScriptbookedNewGuideTuplesList'
						])
				]
			)
			'''
			
			#map a guide for the news
			map(
				lambda __ScriptbookedNewGuideTuple:
#.........这里部分代码省略.........
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:103,代码来源:__init__.py

示例5: shape

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import groupby [as 别名]
	def shape(self,_DimensionsTupleList=None,**_KwargVariablesDict):

		#Init
		if self.ShapingDimensionsTupleList==None:
			self.ShapingDimensionsTupleList=[]

		#Init
		if self.ShapedGettingStrsList==None:
			self.ShapedGettingStrsList=[]
		if self.ShapedColClassAndGettingStrTuplesList==None:
			self.ShapedColClassAndGettingStrTuplesList=[]

		#set the ShapedOldModelingDescriptionTuplesList
		self.ShapedCopyModelingDescriptionTuplesList=copy.copy(self.ModelingDescriptionTuplesList)

		#debug
		'''
		self.debug('We are going to filter the shaping tuples among the columning tuples')
		'''

		#Unpack
		[
			self.ShapedModelingDescriptionTuplesList,
			self.ShapedNotModelingDescriptionTuplesList
		]=SYS.groupby(
					lambda __ColumnTuple:
					type(__ColumnTuple[1])==tuple,
					self.ModelingDescriptionTuplesList,
				)

		#set the ShapedGettingStrsList and ShapedColClassAndGettingStrTuplesList
		FilteredList=map(list,
				SYS.unzip(self.ShapedModelingDescriptionTuplesList,[0,1])
			)
		if len(FilteredList)>0:
			[
				self.ShapedGettingStrsList,
				self.ShapedColClassAndGettingStrTuplesList
			]=FilteredList

		#debug
		'''
		self.debug(
					('self.',self,[
									'ShapedNotModelingDescriptionTuplesList',
									'ShapedGettingStrsList',
									'ShapedColClassAndGettingStrTuplesList'
								]
					)
			)
		'''

		#set the ShapedGettingStrsList
		self.ShapedDimensionKeyStrsList=list(set(SYS.unzip(
			self.ShapedColClassAndGettingStrTuplesList,[1]
			)))

		#debug
		'''
		self.debug(("self.",self,['ShapedGettingStrsList']))
		'''

		#set the ShapedVariablePointer to get inside the shaped variables
		if self.ShapedVariablePointer==None and hasattr(self,'NodedDatabaseParentPointer'):
			self.ShapedVariablePointer=self.NodedDatabaseParentPointer

		#set the ShapedVariablesList setting
		self.ShapedDimensionVariablesList=map(
				lambda  __GettedVariable:
				(__GettedVariable)
				if type(__GettedVariable)==int 
				else tuple(__GettedVariable),
				map(
					lambda __ShapedDimensionKeyStr:
					self.ShapedVariablePointer[__ShapedDimensionKeyStr],
					self.ShapedDimensionKeyStrsList
				)
			)

		#Bind with ModeledShapedStr setting
		self.ShapedStr=ShapingJoiningStr.join(
									map(
											lambda __ShapingGettingStr,__ShapedVariable:
											ShapingJoiningStr+str(
												__ShapingGettingStr
												)+ShapingTuplingStr+str(
												__ShapedVariable),
											self.ShapedDimensionKeyStrsList,
											self.ShapedDimensionVariablesList
										)
		)

		#debug 
		'''
		self.debug(('self.',self,['ShapedDimensionVariablesList','ShapedStr']))
		'''

		#<NotHook>
		#Return self
		return self
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:102,代码来源:__init__+-+copie.py

示例6: do_represent

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

		#alias
		RepresentedClass=self.DoClass

		#debug
		'''
		print('Representer l.352 : RepresentedClass is ',RepresentedClass)
		print('')
		'''

		#Check
		'''
		if hasattr(RepresentedClass,'RepresentingKeyStrsList')==False or (
			len(RepresentedClass.__bases__)>0 and hasattr(RepresentedClass.__bases__[0
			],'RepresentingKeyStrsList') and RepresentedClass.__bases__[0
			].RepresentingKeyStrsList==RepresentedClass.RepresentingKeyStrsList):
			
			#init
			RepresentedClass.RepresentingKeyStrsList=[]
		'''

		RepresentedClass.RepresentingKeyStrsList=RepresentedClass.DefaultSetKeyStrsList

		#init
		#RepresentedClass.RepresentingSkipKeyStrsList=None

		#init
		#RepresentedClass.RepresentingForceKeyStrsList=None

		#set the BaseKeyStrsList
		KeyStrsSet=set(
			SYS.collect(
					RepresentedClass,
					'__bases__',
					'RepresentingKeyStrsList'
					)
			)
		#KeyStrsSet.difference_update(set(RepresentedClass.RepresentingKeyStrsList))
		RepresentedClass.RepresentedBaseKeyStrsList=list(KeyStrsSet)

		#Split between the one from the class or not
		[
			RepresentedClass.RepresentedSpecificKeyStrsList,
			RepresentedClass.RepresentedNotSpecificKeyStrsList
		]=SYS.groupby(
			lambda __KeyStr:
			__KeyStr not in RepresentedClass.RepresentedBaseKeyStrsList,
			RepresentedClass.RepresentingKeyStrsList
		)

		#debug
		'''
		print(
				RepresentedClass.__name__,
				#Class.__mro__,
				#Class.RepresentedNotGettingStrsList,
				list(RepresentedClass.RepresentedBasedKeyStrsList)
				)
		'''	

		#Add to the KeyStrsList
		RepresentedClass.KeyStrsList+=[
									'RepresentingKeyStrsList',
									'RepresentingSkipKeyStrsList',
									'RepresentingForceKeyStrsList',
									'RepresentedBaseKeyStrsList',
									'RepresentedSpecificKeyStrsList',
									'RepresentedNotSpecificKeyStrsList',
								]

		"""
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:74,代码来源:__init__.py

示例7: do_numscipy

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

#.........这里部分代码省略.........
					#debug
					'''
					self.debug(
						[
							'We switch the sign',
							('self.',self,[
									'NumscipyingSwitchFloat'
								])
						]
					)
					'''

					#import
					import itertools

					#filter the upper index tuples
					self.NumscipiedIndexIntsTuplesList=filter(
						lambda __Tuple:
						__Tuple[1]!=__Tuple[0],
						itertools.product(
							xrange(self.NumscipyingColsInt),
							xrange(self.NumscipyingColsInt)
						)
					)

					#/#################/#
					# group by the null and non null index tuples
					#

					#filter
					[
						self.NumscipiedNonNullIndexIntsTuplesList,
						self.NumscipiedNullIndexIntsTuplesList
					]=SYS.groupby(
						lambda __IndexIntsTuple:
						self.NumscipiedValueFloatsArray[
							__IndexIntsTuple
						]!=0.,
						self.NumscipiedIndexIntsTuplesList
					)

					#len
					NumscipiedSwitchsInt=int(self.NumscipyingSwitchFloat*len(
							self.NumscipiedNonNullIndexIntsTuplesList
						)
					)

					#copy
					self.NumscipiedToSwitchIndexIntsTuplesList=self.NumscipiedNonNullIndexIntsTuplesList[:]

					#debug
					'''
					self.debug(
						[
							'Before shuffle to switch',
							('self.',self,[
									'NumscipiedToSwitchIndexIntsTuplesList'
								]),
						]
					)
					'''

					#Shuffle and pick the NumscipiedToSwitchIndexIntsTuplesList
					np.random.shuffle(
						self.NumscipiedToSwitchIndexIntsTuplesList
					)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:70,代码来源:__init__.py

示例8: do

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import groupby [as 别名]
def do(
		_InstanceVariable,
		*_LiargVariablesList,
		**_KwargVariablesDict
	):

	#/################/#
	# Prepare the call of the do method
	#

	#Define
	DoDecorationMethodStr=_KwargVariablesDict['DoDecorationMethodStr']
	DoMethodStr=DoDecorationMethodStr.split(
		DoingDecorationPrefixStr+DoingDecorationTagStr+DoingDecorationSuffixStr
	)[-1] if DoingDecorationSuffixStr in DoDecorationMethodStr else DoDecorationMethodStr
	DoStr=DoMethodStr[0].upper()+DoMethodStr[1:] if DoMethodStr[0]!="_" else DoMethodStr[0]+DoMethodStr[1].upper()+DoMethodStr[2:]
	DoingStr=DoStrToDoingStrOrderedDict[DoStr]
	DoClassStr=_KwargVariablesDict['DoClassStr']
	DoClass=getattr(SYS,DoClassStr)
	DoWrapMethodStr=DoingWrapPrefixStr+DoMethodStr
	DoWrapUnboundMethod=getattr(
								DoClass,
								DoWrapMethodStr
							)
	del _KwargVariablesDict['DoDecorationMethodStr']
	del _KwargVariablesDict['DoClassStr']

	#/################/#
	# Look in the Kwarg if there were specifications of doing attributes
	#

	#debug
	'''
	print('Doer l.219 inside of the function DoFunction')
	#print('InstanceVariable is ',_InstanceVariable)
	print('_LiargVariablesList is ',_LiargVariablesList)
	print('_KwargVariablesDict is ',_KwargVariablesDict)
	print('')
	'''

	#Definition of the DoKwargTuplesList
	DoKwargTuplesList=map(
		lambda __KwargTuple:
		(
			DoingStr+DoingAttributePrefixStr.join(
			__KwargTuple[0].split(DoingAttributePrefixStr)[1:]),
			__KwargTuple[1]
		) if __KwargTuple[0].startswith(DoingAttributePrefixStr)
		else __KwargTuple,
		_KwargVariablesDict.items()
	)

	#Debug
	'''
	print('Doer l 239 ')
	print('DoKwargTuplesList is')
	print(DoKwargTuplesList)
	print('')
	'''

	#Check
	if len(DoKwargTuplesList)>0:

		#group by
		[
			DoClass.DoTempAttributeItemTuplesList,
			DoClass.DoTempNotAttributeItemTupleItemsList
		]=SYS.groupby(
			lambda __DoKwargTuple:
			hasattr(_InstanceVariable,__DoKwargTuple[0]),
			DoKwargTuplesList
		)

		#set in the instance the corresponding kwarged arguments
		map(	
				lambda __DoTempAttributeItemTuple:
				#set direct explicit attributes
				_InstanceVariable.__setattr__(*__DoTempAttributeItemTuple),
				DoClass.DoTempAttributeItemTuplesList
			)

		#Define
		DoneKwargDict=dict(DoClass.DoTempNotAttributeItemTupleItemsList)

	else:

		#Define
		DoneKwargDict={}

	#/################/#
	# Set to default values the doing and done mutables 
	#

	#set
	_InstanceVariable.setDefaultMutable(
		DoClass,
		_AttributeKeyVariable=DoClass.DoingAttributeVariablesOrderedDict.keys(
			)+DoClass.DoneAttributeVariablesOrderedDict.keys()
	)

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

示例9: mimic

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import groupby [as 别名]
def mimic(_InstanceVariable,*_LiargVariablesList,**_KwargVariablesDict):

	#Set
	MimicMethodStr=_KwargVariablesDict['MimicMethodStr']
	MimicClassStr=_KwargVariablesDict['MimicClassStr']
	MimicClass=getattr(SYS,MimicClassStr)
	MimicUnBoundMethod=getattr(
		MimicClass,
		MimicMethodStr
	)
	BaseClassStr=_KwargVariablesDict['BaseClassStr']
	BaseClass=getattr(SYS,BaseClassStr)
	del _KwargVariablesDict['MimicMethodStr']
	del _KwargVariablesDict['MimicClassStr']
	del _KwargVariablesDict['BaseClassStr']
	
	#Debug
	'''
	print('Mimicker l.48 inside of the function mimic')
	#print('_InstanceVariable is ',_InstanceVariable)
	print('_LiargVariablesList is ',_LiargVariablesList)
	print('_KwargVariablesDict is ',_KwargVariablesDict)
	print('')
	'''

	if len(_KwargVariablesDict)>0:

		#group by
		[
			MimicTempAttributeItemTuplesList,
			MimicTempNotAttributeItemTuplesList
		]=SYS.groupby(
			lambda __KwargItemTuple:
			hasattr(_InstanceVariable,__KwargItemTuple[0]),
			_KwargVariablesDict.items()
		)

		#Debug
		'''
		print('MimicTempAttributeItemTuplesList is ',MimicTempAttributeItemTuplesList)
		print('MimicTempNotItemTuplesList is ',MimicTempNotItemTuplesList)
		print('')
		'''

		#set in the instance the corresponding kwarged arguments
		map(	
				lambda __MimicTempAttributeItemTuple:
				#set direct explicit attributes
				_InstanceVariable.__setattr__(*__MimicTempAttributeItemTuple),
				MimicTempAttributeItemTuplesList
			)

		#Define
		MimicKwargDict=dict(MimicTempNotAttributeItemTuplesList)

	else:

		#Define
		MimicKwargDict={}

	#Init
	MimicOutputVariable=None

	#Debug
	'''
	print('Mimicker l.96 inside of the function mimic')
	print('MimicClass is ',MimicClass)
	print('MimicMethodStr is ',MimicMethodStr)
	print('MimicUnBoundMethod is ',MimicUnBoundMethod)
	print('')
	'''
	
	#call the Mimicked function
	if len(MimicKwargDict)>0:
		MimicOutputVariable=MimicUnBoundMethod(
							_InstanceVariable,
							*_LiargVariablesList,
							**MimicKwargDict
						)
	else:
		MimicOutputVariable=MimicUnBoundMethod(
				_InstanceVariable,
				*_LiargVariablesList
			)

	#Debug
	'''
	print('Mimicker l.117 inside of the function mimic')
	print('MimicOutputVariable is ',MimicOutputVariable)
	print('')
	'''

	#Check
	if BaseClass.DoingGetBool==False:

		#Return 
		return _InstanceVariable
	
	else:

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

示例10: MimickedNewFunction

# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import groupby [as 别名]
		def MimickedNewFunction(_InstanceVariable,*_LiargVariablesList,**_KwargVariablesDict):
			
			#Set
			MimicMethodStr=_KwargVariablesDict['MimicMethodStr']
			del _KwargVariablesDict['MimicMethodStr']
			MimicDoStr=MimickingPrefixStr.join(MimicMethodStr.split(MimickingPrefixStr)[1:])
			MimicDoStr=MimicDoStr[0].upper()+MimicDoStr[1:] if MimicDoStr[0]!='_' else MimicDoStr[1].upper()+MimicDoStr[2:]
			MimicNameStr=Doer.DoStrToDoerStrOrderedDict[MimicDoStr]
			MimicClass=getattr(SYS,SYS.getClassStrWithNameStr(MimicNameStr))
			DoClassStr=_KwargVariablesDict['DoClassStr']
			del _KwargVariablesDict['DoClassStr']
			DoClass=getattr(SYS,DoClassStr)

			#Debug
			'''
			print('Mimicker l.119 inside of the function MimickedNewFunction')
			#print('_InstanceVariable is ',_InstanceVariable)
			print('_LiargVariablesList is ',_LiargVariablesList)
			print('_KwargVariablesDict is ',_KwargVariablesDict)
			print('MimicMethodStr is ',MimicMethodStr)
			print('')
			'''

			if len(_KwargVariablesDict)>0:

				#group by
				[
					MimicItemTuplesList,
					MimicNotItemTuplesList
				]=SYS.groupby(
					lambda __ItemTuple:
					hasattr(_InstanceVariable,__ItemTuple[0]),
					_KwargVariablesDict.items()
				)

				#Debug
				'''
				print('MimicItemTuplesList is ',MimicItemTuplesList)
				print('MimicNotItemTuplesList is ',MimicNotItemTuplesList)
				print('')
				'''

				#set in the instance the corresponding kwarged arguments
				map(	
						lambda __ItemTuple:
						#set direct explicit attributes
						_InstanceVariable.__setattr__(*__ItemTuple),
						MimicItemTuplesList
					)

				#Define
				MimicKwargDict=dict(MimicNotItemTuplesList)

			else:

				#Define
				MimicKwargDict={}

			#Init
			MimicOutputVariable=None

			#Debug
			'''
			print('Mimicker l.167 inside of the function MimickedNewFunction')
			print('DoClass is ',DoClass)
			print('MimicMethodStr is ',MimicMethodStr)
			print('')
			'''

			#Get the method
			MimicUnBoundMethod=getattr(
				DoClass,
				MimicMethodStr
			)

			#Debug
			'''
			print('Mimicker l.181 inside of the function MimickedNewFunction')
			print('MimicUnBoundMethod is ',MimicUnBoundMethod)
			print('MimicKwargDict is ',MimicKwargDict)
			print('')
			'''
			
			#call the Mimicked function
			if len(MimicKwargDict)>0:
				MimicOutputVariable=MimicUnBoundMethod(
									_InstanceVariable,
									*_LiargVariablesList,
									**MimicKwargDict
								)
			else:
				MimicOutputVariable=MimicUnBoundMethod(
						_InstanceVariable,
						*_LiargVariablesList
					)

			#Debug
			'''
			print('Mimicker l.178 inside of the function MimickedNewFunction')
			print('MimicClass is ',MimicClass)
#.........这里部分代码省略.........
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:103,代码来源:__init__+copy.py


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