@@ -7,20 +7,16 @@ def __init__(self):
77 self .buffer = {}
88 def add (self ,id :str ,value :tuple ):
99 self .buffer [id ]= value
10- print ('added' ,self .buffer )
1110 def get (self ,id :str ,default = []):
1211 a = self .buffer .get (id ,default )
1312 return a
1413 def update (self ):
1514 for id ,values in dict (self .buffer ).items ():
1615 self .bigupdate (id ,values )
17- print ('bigupdate' ,self .buffer )
1816 for id ,values in dict (self .buffer ).items ():
1917 self .a = []
20- print ('tidy' ,id ,values )
2118 self .tidy (values )
2219 self .buffer [id ]= self .a
23- print ('tidy' ,self .buffer )
2420
2521 def tidy (self ,v ):
2622 if isinstance (v ,list ):
@@ -33,22 +29,16 @@ def bigupdate(self,_id="",values=(),recursive=False):
3329 a = []
3430 for i in range (len (values )):
3531 value = values [i ]
36- if value is None :
37- continue
3832 if isinstance (value ,(int ,float ,list )):
39- a .append (value )
33+ a .append (str ( value ) )
4034 elif isinstance (value ,str ):
41- a .append ("\\ \ " " + value + "\\ \" " )
35+ a .append ("\" " + value + "\" " )
4236 elif isinstance (value ,Symbol ):
43- print ('bigupdate-symin' ,value .symbol )
4437 a .append (value .symbol )
4538 elif isinstance (value ,BlockID ):
46- print ('bigupdate-in' ,value ._id )
47- print ('input' ,self .buffer [value ._id ])
48- a .append (self .bigupdate (_id ,(Symbol ('(' ),* self .buffer [value ._id ],Symbol (')' ),True )))
39+ a .append (self .bigupdate (_id ,(Symbol ('(' ),* self .buffer [value ._id ],Symbol (')' )),True ))
4940 elif isinstance (value ,(SArray ,SVariable )):
5041 '''在InputParser/VarListParser中处理'''
51- print ('bigupdate-in-s' ,value .name ,value .value )
5242 if recursive :
5343 return a
5444 else :
0 commit comments