本文整理汇总了Python中Interpreter.Interpreter.getEnvLocals方法的典型用法代码示例。如果您正苦于以下问题:Python Interpreter.getEnvLocals方法的具体用法?Python Interpreter.getEnvLocals怎么用?Python Interpreter.getEnvLocals使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Interpreter.Interpreter
的用法示例。
在下文中一共展示了Interpreter.getEnvLocals方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: testInterpreterGeneral1
# 需要导入模块: from Interpreter import Interpreter [as 别名]
# 或者: from Interpreter.Interpreter import getEnvLocals [as 别名]
def testInterpreterGeneral1( ConsClass):
def testCrCr( ex, ou, d= None):
htEnvLocals= { id( env_locals1) : "env_locals1"}
if not None == d:
htEnvLocals.update( d)
test( ConsRepr( ex ).repr_wrapped( htEnvLocals, [ CpctReprCodeListConfigMake]),
ConsRepr( ou ).repr_wrapped( htEnvLocals, [ CpctReprCodeListConfigMake]))
def codeListFake( rest):
if InterpreterStructures.alteVariante:
return cs( ar_codeList, cs( codeListConfigMakeRepr, rest))
else:
return cs( ar_codeList, cs( codeListConfigMakeRepr, cs( ar_codeListParameters, rest)))
def codeListFakeRoot( rest):
if InterpreterStructures.alteVariante:
return cs( ar_codeList, cs( codeListConfigMakeRepr, rest))
else:
return cs( ar_codeList, cs( codeListConfigMakeRepr, cs( ar_codeListParameters, cs( s( 'progn-root'), rest))))
te.checkComplainAndAdjustExpected( 0)
i= Interpreter()
env_locals1= i.getEnvLocals()
codeListConfigMakeRepr= 'codeListConfigMake( ...)'
uNames.next( usRename( ConsAbstractCarAutoHistoryCSCS, 'ConsSimple'))
testCrCr( codeListFakeRoot( nil), i.codeList)
test( nil , i.codeListParent2EvalToken )
if InterpreterStructures.alteVariante:
testCrCr( cs( cs( ar_codeList, i.codeListCurrentEvalTokenList.cdr()), nil), i.codeCurrentLeafList,
{ id( i.codeListCurrentEvalTokenList.cdr()): 'codeListCurrentEvalTokenList.cdr()'})
else:
testCrCr( cs( cs( ar_codeList, cs( codeListConfigMakeRepr, i.codeListCurrentEvalTokenList)), nil), i.codeCurrentLeafList,
{ id( i.codeListCurrentEvalTokenList.cdr()): 'codeListCurrentEvalTokenList.cdr()'})
uNames.undo()
codeLeaf= i.codeLeafBackTree.car()
testCrCr( cs( codeLeaf, nil), i.codeLeafBackTree, { id( codeLeaf): 'codeLeaf'})
te.checkComplainAndAdjustExpected( 4)
if False:
pass
elif id( ConsClass) == id( ConsAbstractCarAutoHistoryCSCS): # b4dfedc64bf1440b82f109a25c7f8421
#ConsAbstractCarAutoHistoryCSCS.__name__= 'cs'
#ConsSimple.__name__= 'cs'
uNames.next( usRename( ConsAbstractCarAutoHistoryCSCS, 'cs'))
uNames.next( usRename( ConsSimple, 'cs'))
i.evalToken( s( 'aa'))
ht_selfid2Name= { id( env_locals1): 'env_locals1'}
testCrCr( cs( ar_codeList, cs( env_locals1, cs( s( 'aa'), nil))), i.codeList)
testCrCr( cs( s( 'aa'), nil), i.codeListCurrentEvalTokenList.cdr())
currentLeaf= i.codeCurrentLeafList.car()
testCrCr( cs( ar_codeList, cs( env_locals1, i.codeListCurrentEvalTokenList.cdr())), currentLeaf)
testCrCr( cs( currentLeaf, nil), i.codeCurrentLeafList)
codeLeaf= i.codeLeafBackTree.car()
testCrCr( cs( codeLeaf, nil), i.codeLeafBackTree)
test( 'aa', i.codeList.cdr().cdr().car())
test( id( consHistory), id( i.codeList.cdr().consWrapped.car().car()))
testCrCr( cs( consHistory, cs( s( 'aa'), nil)), i.codeList.cdr().cdr().consWrapped.car())
i.evalToken( s( '('), True)
testCrCr( cs( env_locals1, nil), i.codeListCurrentEvalTokenList.cdr())
currentLeaf= i.codeCurrentLeafList.car()
testCrCr( cs( ar_codeList, i.codeListCurrentEvalTokenList.cdr()), currentLeaf)
testCrCr( cs( currentLeaf, cs( cs( ar_codeList, cs( env_locals1, cs( currentLeaf, nil))), nil)), i.codeCurrentLeafList)
codeLeaf= i.codeLeafBackTree.car()
testCrCr( cs( codeLeaf, nil), i.codeLeafBackTree)
i.evalToken( s( 'bb'))
testCrCr( cs( s( 'bb'), nil), i.codeListCurrentEvalTokenList.cdr())
currentLeaf= i.codeCurrentLeafList.car()
testCrCr( cs( ar_codeList, cs( env_locals1, i.codeListCurrentEvalTokenList.cdr())), currentLeaf)
testCrCr( cs( currentLeaf, cs( cs( ar_codeList, cs( env_locals1, cs( currentLeaf, nil))), nil)), i.codeCurrentLeafList)
codeLeaf= i.codeLeafBackTree.car()
testCrCr( cs( codeLeaf, nil), i.codeLeafBackTree)
i.evalToken( s( ')'))
testCrCr( cs( cs( ar_codeList, cs( env_locals1, cs( s( 'bb'), nil))), nil), i.codeListCurrentEvalTokenList.cdr())
currentLeaf= i.codeCurrentLeafList.car()
testCrCr( cs( ar_codeList, cs( env_locals1, i.codeListCurrentEvalTokenList.cdr())), currentLeaf)
testCrCr( cs( currentLeaf, nil), i.codeCurrentLeafList)
codeLeafBefore= codeLeaf
codeLeaf= i.codeLeafBackTree.car()
testCrCr( cs( codeLeaf, cs( codeLeafBefore, nil)), i.codeLeafBackTree)
#.........这里部分代码省略.........