本文整理汇总了Python中ShareYourSystem.indent方法的典型用法代码示例。如果您正苦于以下问题:Python ShareYourSystem.indent方法的具体用法?Python ShareYourSystem.indent怎么用?Python ShareYourSystem.indent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ShareYourSystem
的用法示例。
在下文中一共展示了ShareYourSystem.indent方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
}
):
#call the base method
object.__init__(self)
#Definition an attribute
self.MyStr='I am a Foo with MyFloat equal to '+str(self.MyFloat)+' and Int equal to '+str(Int)
#print
print("\n".join(
[
'FooClass.__init__ is '+str(FooClass.__init__),
'FooClass has some special attributes',
#'FooClass.InitInspectDict is '+SYS._str(FooClass.InitInspectDict),
'FooClass.DefaultAttributeVariablesOrderedDict is '+SYS.indent(
FooClass.DefaultAttributeVariablesOrderedDict),
'FooClass.MyFloat is '+str(FooClass.MyFloat),
'FooClass.MyInt is '+str(FooClass.MyInt),
]
)
)
#Definition a default instance that will take its values from the default classed attributes
DefaultFoo=FooClass(3)
#print
print("\n"+"\n".join(
[
'What are you saying DefaultFoo ?',
'DefaultFoo.__dict__ is '+str(DefaultFoo.__dict__),
'DefaultFoo.MyFloat is '+str(DefaultFoo.MyFloat),
示例2: FooClass
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
#ImportModules
import ShareYourSystem as SYS
#Definition a FooClass decorated by the ClassorClass
@SYS.ClassorClass()
class FooClass(object):
pass
#note that the SYS.indent does the same thing
print('FooClass.__dict__ is ')
print(SYS.indent(FooClass))
示例3: MakerClass
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
# ImportModules
import ShareYourSystem as SYS
# define
@SYS.InspecterClass()
class MakerClass(object):
def default_init(self, _MakingMyStr, _MakingMyInt=0, **_KwargVariablesDict):
object.__init__(self, **_KwargVariablesDict)
def do_make(self):
# str
self.MadeMyStr = str(self.MakingMyStr)
# print
print("MakerClass.InspectedArgumentDict is ")
print(SYS.indent(MakerClass.InspectedArgumentDict))
示例4: do_make
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
):
object.__init__(self)
def do_make(self):
#print
print('self.MakingMyFloat is '+str(self.MakingMyFloat))
print('self.MadeMyInt is '+str(self.MadeMyInt))
print('')
#Cast
self.MadeMyInt=int(self.MakingMyFloat)
#print
print('MakerClass.SwitchMethodDict is ')
print(SYS.indent(MakerClass.SwitchMethodDict))
#Definition an instance
MyMaker=MakerClass()
#print
print('MyMaker.getSwitch() is ')
print(SYS.indent(MyMaker.getSwitch()))
#Print
print('Before make, MyMaker.__dict__ is ')
SYS._print(MyMaker.__dict__)
#make once
print('We make for the first time')
MyMaker.make(3.)
示例5: MakerClass
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
@SYS.PropertiserClass()
class MakerClass(SYS.PrinterClass):
def default_init(self,
_MakingMyFloat={
'DefaultValueType':property,
'PropertyInitVariable':3.,
'PropertyDocStr':'I am doing the thing here'
}
):
SYS.PrinterClass.__init__(self)
#Print and show that the class has already propertize_(get,set,del)MakingMyFloat
# a default _MakingMyFloat value and the MakingMyFloat prop
print('SYS.MakerClass.__dict__ is')
print(SYS.indent(SYS.MakerClass.__dict__))
#Define
MyMaker=SYS.MakerClass()
#print the __dict__, there is no things related to the
#MakingMyFloat property
print('MyMaker.__dict__ before set is ')
SYS._print(MyMaker.__dict__)
#set
MyMaker.MakingMyFloat=7.
#print the __dict__, now there is the hidden attribute
print('MyMaker.__dict__ after set is ')
SYS._print(MyMaker.__dict__)
示例6: do_build
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
#call the parent method
MakerClass.make(self)
#cast
self.MadeMyInt+=10
def do_build(self):
pass
#Definition an instance
MyBuilder=BuilderClass()
#Print
print('Before make, MyBuilder.__dict__ is ')
print(SYS.indent(MyBuilder.__dict__))
#print
print('MyBuilder.getSwitch() is ')
print(SYS.indent(MyBuilder.getSwitch()))
#make once
MyBuilder.make(3.)
#Print
print('After the first make, MyBuilder is ')
print(SYS.indent(MyBuilder.__dict__))
#print
print('MyBuilder.getSwitch() is ')
print(SYS.indent(MyBuilder.getSwitch()))
示例7: FooClass
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
#ImportModules
import ShareYourSystem as SYS
#Definition a FooClass decorated by the DefaultorClass
@SYS.DefaultorClass()
class FooClass(object):
def default_init(self,
_ShareClassor=SYS.ClassorClass(),
_SpecificClassor=None
):
object.__init__(self)
#Definition
FooClass.ShareClassor.MyInt=2
MyFirstFoo=FooClass()
MySecondFoo=FooClass()
#Definition the AttestedStr
print("\n".join(
[
'MyFirstFoo.ShareClassor.__dict__ is ',SYS.indent(
MyFirstFoo.ShareClassor.__dict__),
'MyFirstFoo.__dict__ is '+SYS.indent(MyFirstFoo.__dict__),
'MyFirstFoo.SpecificClassor is '+str(MyFirstFoo.SpecificClassor)
]
)
)
示例8: print
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
#print
print('self.MadeMyInt is ')
print(self.MadeMyInt)
#Definition a MakerClass with decorated make by a Switcher
@SYS.SwitcherClass()
class BuilderClass(MakerClass):
def default_init(self,
):
MakerClass.__init__(self)
#print
print('BuilderClass.SwitchMethodDict is ')
print(SYS.indent(BuilderClass.SwitchMethodDict))
#Definition an instance
MyBuilder=BuilderClass()
#Print
print('Before make, MyBuilder.__dict__ is ')
SYS._print(MyBuilder.__dict__)
#print
print('MyBuilder.getSwitch()')
print(SYS.indent(MyBuilder.getSwitch()))
#make once
print('We make')
print(MyBuilder.make)
示例9: MakerClass
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
#ImportModules
import ShareYourSystem as SYS
#define
@SYS.ClassorClass()
class MakerClass(object):
def default_init(self,
_MakingMyStr,
_MakingMyInt=0,
**_KwargVariablesDict
):
object.__init__(self,**_KwargVariablesDict)
def do_make(self):
#str
self.MadeMyStr=str(self.MakingMyStr)
#print
print('MakerClass.InspectInspectDict is ')
print(SYS.indent(
MakerClass.InspectInspectDict
)
)
示例10: print
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
):
FooClass.__init__(self)
#put in the SYS scope
SYS.FeeClass=FeeClass
#Definition
MyFee=FeeClass(**{
'MyFloat':5.,
'MyInt':9,
'MyBool':False
})
#Before default
print('Before setDefault MyFee.__dict__ is')
print(SYS.indent(MyFee.__dict__))
#default and also init the mutable variables
MyFee.setDefault(
#ClassVariable,
[FooClass,'FeeClass'],
**{'DefaultMutableBool':True}
)
#print
print('\nMyFee.__dict__ is ')
print(SYS.indent(MyFee.__dict__))
示例11: do_make
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
def do_make(self):
#set
self.MadeMyInt=self.MakingMyFloat
#define and itemize just like a get
MyMaker=MakerClass(
).itemize(
#ItemizingKeyVariable
'MakingMyFloat'
)
#print
print('MyMaker.getDo(SYS.ItemizerClass) for a simple get like is ')
print(SYS.indent(MyMaker.getDo(SYS.ItemizerClass)))
#define and itemize like a set
MyMaker=MakerClass(
).itemize(
#ItemizingKeyVariable
'MakingMyFloat',
#ItemizingValueVariable
3.
)
#print
print('MyMaker.getDo(SYS.ItemizerClass) for a set like is ')
print(SYS.indent(MyMaker.getDo(SYS.ItemizerClass)))
#define and itemize
示例12: default_init
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
def default_init(self,
_MakingMyFloat=1.,
_MakingShareList=['bonjour'],
_MakingRestrictList=None,
_MakingMyInt={'DefaultValueType':int}
):
object.__init__(self)
def do_make(self):
#print
print('Maker : I am going to make')
print('')
#set
self.MadeMyInt=int(self.MakingMyFloat)
#print
print('InspectMethodDict is ')
print(SYS.indent(MakerClass.InspectMethodDict))
#print
print("\n".join([
'MakerClass.do_make is '+str(MakerClass.do_make),
'MakerClass.doWithmake is '+str(MakerClass.superDo_make),
'MakerClass.make is '+str(MakerClass.make),
'MakerClass.callDo is '+str(MakerClass.callDo),
]))
示例13: MakerClass
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
#Define
@SYS.PropertiserClass()
class MakerClass(object):
def default_init(self,
_MakingMyList=None,
_MakingMyInt={
'DefaultValueType':property,
'PropertyInitVariable':None,
'PropertyDocStr':'I am doing the thing here',
'ShapeDict':{
'MakingMyList':0
}
},
_MadeMyInt=0
):
object.__init__(self)
#Define
MyMaker=MakerClass()
#Set and this will bind the value of MakingMyInt
MyMaker.MakingMyInt=2
#print
print('MyMaker.__dict__ is ')
print(SYS.indent(MyMaker))
示例14: do_build
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
object.__init__(self)
def do_build(self):
#print
print('We build here')
#first make
self.make()
#Cast
self.BuiltMyStr='My MadeMyInt is '+str(self.MadeMyInt)
#print
print('BuilderClass.SwitchMethodDict is ')
print(SYS.indent(BuilderClass.SwitchMethodDict))
#Definition an instance
MyBuilder=BuilderClass()
#Print
print('Before make, MyBuilder.__dict__ is ')
SYS._print(MyBuilder.__dict__)
#make once
print('NOW we build')
MyBuilder.build(**{'MakingMyFloat':3.})
#Print
print('After the build, MyBuilder.__dict__ is ')
SYS._print(MyBuilder.__dict__)
示例15: print
# 需要导入模块: import ShareYourSystem [as 别名]
# 或者: from ShareYourSystem import indent [as 别名]
#ImportModules
import ShareYourSystem as SYS
#Definition
MyInterfacer=SYS.InterfacerClass()
#print
print('MyInterfacer.__dict__ is ')
print(SYS.indent(MyInterfacer.__dict__))