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


Python ShareYourSystem.getKeyStrsListWithClass方法代码示例

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


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

示例1: do_derive

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

		#Debug
		'''
		print('self.DoClass is ',self.DoClass)
		print('')
		'''

		#alias
		DoClass=self.DoClass

		#Link
		self.DerivedModule=sys.modules[DoClass.__module__]

		#set
		if len(DoClass.__bases__)>0:

			#set the DerivedBaseClas
			DerivedBaseClass=DoClass.__bases__[0]

			#Debug
			'''
			print('l. 83 Deriver')
			print('We can set derived bases for the parent')
			print('DerivedBaseClass is ',DerivedBaseClass)
			print('')
			'''
			
			#Append to the parent class 
			if hasattr(DerivedBaseClass,'DerivedClassesList'):
				DerivedBaseClass.DerivedClassesList.append(DoClass)
			elif DerivedBaseClass!=object:
				DerivedBaseClass.DerivedClassesList=[DoClass]

			#Add to the KeyStrsList
			DoClass.KeyStrsList+=SYS.getKeyStrsListWithClass(DoClass)
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:38,代码来源:__init__.py

示例2: getReprStr

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

#.........这里部分代码省略.........
			)

			#filter
			PrintedNewInstanceTuplesList=SYS._filter(
					lambda __PrintedNewInstanceTuple:
					__PrintedNewInstanceTuple[0] not in list(
						self.PrintingInstanceSkipKeyStrsList)+list(
						self.PrintingClassSkipKeyStrsList),
					PrintedNewInstanceTuplesList
				)

			#map
			PrintTuplesList+=map(
				lambda __NewItemTuple:
				(
					"<New><Instance>"+__NewItemTuple[0],
					__NewItemTuple[1]
				),
				PrintedNewInstanceTuplesList
			)

		#/###################/#
		# Print the New key strs in the class
		#

		#Represent the NewClassKeyStrs in the _self.__class____.__dict__
		if self.PrintingNewClassBool:


			#filter
			PrintedNewClassKeyStrsList=SYS._filter(
					lambda __KeyStr:
					__KeyStr not in self.__class__.KeyStrsList and __KeyStr not in self.__dict__,
					SYS.getKeyStrsListWithClass(
						self.__class__
					)
				)

			#filter
			PrintedNewClassKeyStrsList=SYS._filter(
					lambda __NewClassKeyStr:
					__NewClassKeyStr not in list(
					self.PrintingInstanceSkipKeyStrsList)+list(
					self.PrintingClassSkipKeyStrsList),
					PrintedNewClassKeyStrsList
				)

			#filter
			PrintTuplesList+=map(
				lambda __NewKeyStr:
				(
					"<New><Class>"+__NewKeyStr,
					self.__class__.__dict__[__NewKeyStr]
				),
				PrintedNewClassKeyStrsList
			)
		
		#/###################/#
		# Print force key strs
		#

		#Debug
		'''
		print('Printer l 811')
		print('We add some forced Key Strs')
		print('')
开发者ID:BinWang20140601,项目名称:ShareYourSystem,代码行数:70,代码来源:__init__.py

示例3: __call__

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

#.........这里部分代码省略.........
				)
			setattr(
					_Class,
					mapSetAllMro.__name__,
					mapSetAllMro
				)
			setattr(
					_Class,
					getClass.__name__,
					getClass
				)
			
		#add in LocalModuleFolderPathStrAndModuleStrTuplesList
		global LocalModuleFolderPathStrAndModuleStrTuplesList
		LocalModuleFolderPathStrAndModuleStrTuplesList.append(
			(
				_Class.Module.LocalFolderPathStr,
				_Class.Module.__name__
			)
		)

		#/###################/#
		# Give ref to the concept module
		#

		#append
		ConceptModuleStr='.'.join(_Class.Module.__name__.split('.')[:-1])
		if hasattr(_Class,"ConceptModuleStr")==False or _Class.ConceptModuleStr!=ConceptModuleStr:

			#set
			_Class.ConceptModuleStr=ConceptModuleStr

			#append
			LocalModuleFolderPathStrAndModuleStrTuplesList.append(
					(
						SYS.PythonlogyLocalFolderPathStr+ConceptModuleStr.replace('.','/')+'/',
						ConceptModuleStr
					)
				)
			
		#/###################/#
		# Alert the base method that a derive object exists
		#

		#set
		if len(_Class.__bases__)>0:

			#set the DerivedBaseClas
			FirstBaseClass=_Class.__bases__[0]

			#Debug
			'''
			print('l. 183 Classor')
			print('We can set derived bases for the base')
			print('FirstBaseClass is ',FirstBaseClass)
			print('')
			'''
			
			#Append to the parent class 
			if hasattr(FirstBaseClass,'DeriveClassesList'):
				FirstBaseClass.DeriveClassesList.append(_Class)
			elif FirstBaseClass!=object:
				FirstBaseClass.DeriveClassesList=[_Class]

		#/###################/#
		# Inspect the methods
		#

		#Get the Methods
		_Class.InspectMethodDict=SYS.MethodDict(_Class)

		#dict
		_Class.InspectInspectDict=dict(
			map(	
					lambda __MethodItemTuple:
					(
						__MethodItemTuple[0],
						SYS.InspectDict(
							__MethodItemTuple[1]
						)
					),
					_Class.InspectMethodDict.items()
				)
			)

		#/###################/#
		# set the KeyStrsList
		#

		#set the KeyStrsList
		_Class.KeyStrsList=SYS.getKeyStrsListWithClass(_Class)+['KeyStrsList']

		#/###################/#
		# alias
		#

		self.WrapClass=_Class

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


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