本文整理汇总了Python中ShareYourSystem.getNewMethodBool方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.getNewMethodBool方法的具体用法?Python ShareYourSystem.getNewMethodBool怎么用?Python ShareYourSystem.getNewMethodBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareYourSystem
的用法示例。
在下文中一共展示了ShareYourSystem.getNewMethodBool方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do__class
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getNewMethodBool [as 别名]
#.........这里部分代码省略.........
print('')
'''
#map
map(
lambda __ClassingSwitchUnboundMethodStr:
self.switch(
True,
__ClassingSwitchUnboundMethodStr
),
self.ClassingSwitchMethodStrsList
)
#/###################/#
# Check for overriden propertize_ methods
#
#Debug
'''
print('Classer l 125')
print('Check for overriden propertize_ methods ')
print('self.DoClass.InspectMethodDict')
print(self.DoClass.InspectMethodDict)
print('')
'''
#filter
ClassedPropertyNewMethodDict=dict(
SYS._filter(
lambda __MethodItemTuple:
__MethodItemTuple[0].startswith(
Propertiser.PropertyPrefixStr
) and (
SYS.getNewMethodBool(self.DoClass,__MethodItemTuple[0])
#getattr(
# self.DoClass.__bases__[0],
# __MethodItemTuple[0]
#)!=__MethodItemTuple[1]
#if hasattr(self.DoClass.__bases__[0],
# __MethodItemTuple[0]
#) else True
),
self.DoClass.InspectMethodDict.items()
)
)
#Debug
'''
print('Classer l 147')
print('self.DoClass is ')
print(self.DoClass)
print('ClassedPropertyNewMethodDict is')
print(SYS.indent(ClassedPropertyNewMethodDict))
print('')
'''
#map
ClassedPropertyKeyStrsList=map(
lambda __PropertizedKeyStr:
SYS.deprefix(
__PropertizedKeyStr,
Propertiser.PropertyPrefixStr
)[3:],
ClassedPropertyNewMethodDict.keys()
)
示例2: __call__
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import getNewMethodBool [as 别名]
def __call__(self,_Class):
#debug
'''
print('Defaultor l.31 __call__ method')
print('_Class is ',_Class)
print('')
'''
#Call the parent init method
BaseClass.__call__(self,_Class)
#debug
'''
print('Defaultor l.47 look for an __init__ method')
print('_Class is ',_Class)
print('')
'''
#Check
if hasattr(_Class,"__init__"):
#debug
'''
print('It has an __init__ method')
print('_Class is ')
print(_Class)
print("SYS.getNewMethodBool(_Class,DefaultWrapMethodStr)")
print(SYS.getNewMethodBool(_Class,DefaultWrapMethodStr))
print('')
'''
#get
InitWrapUnboundMethod=getattr(
_Class,
DefaultWrapMethodStr
) if SYS.getNewMethodBool(
_Class,DefaultWrapMethodStr
) else DefaultInitFunction
#set the DefaultDict
_Class.InitInspectDict=SYS.InspectDict(InitWrapUnboundMethod)
#Definition the DefaultAttributeItemTuplesList
DefaultAttributeItemTuplesList=map(
lambda __DefaultSetItemTuple:
(
DefaultPrefixStr.join(
__DefaultSetItemTuple[0].split(DefaultPrefixStr)[1:]
),
getDefaultedValueVariableWithSetVariable(
__DefaultSetItemTuple[1]
)
),
SYS._filter(
lambda __DefaultItemTuple:
__DefaultItemTuple[0].startswith(DefaultPrefixStr),
_Class.InitInspectDict['DefaultOrderedDict'].items()
)
)
#set
_Class.DefaultAttributeVariablesOrderedDict=collections.OrderedDict(
DefaultAttributeItemTuplesList
)
#debug
'''
print('_Class.DefaultAttributeItemTuplesList is ',_Class.DefaultAttributeItemTuplesList)
print('')
'''
#set at the level of the class
map(
lambda __DefaultSetItemTuple:
setattr(_Class,*__DefaultSetItemTuple),
_Class.DefaultAttributeVariablesOrderedDict.items()
)
#set the DefaultSpecificKeyStrsList
_Class.DefaultSpecificKeyStrsList=_Class.DefaultAttributeVariablesOrderedDict.keys()
#Get the BaseKeyStrsList
_Class.DefaultBaseKeyStrsList=list(
SYS.collect(
_Class,
'__bases__',
'DefaultSpecificKeyStrsList'
)
)
#Debug
'''
print("l 269 Defaultor")
print("DefaultDecorationMethodStr is ",DefaultDecorationMethodStr)
print("")
'''
#Define the decorated function
InitExecStr="def "+DefaultDecorationMethodStr+"(_InstanceVariable,"
#.........这里部分代码省略.........