斯潘8
斯潘4
我有一个像往常一样具有输入功能的pythoncaller。
在这个函数中,我有一个要更新的列表。
MyList= = TOTO塔塔
如果COND1:
mylist.remove(toto)日志生成器1
mylist.append(momo)日志生成器2
如果条件2:mylist.remove(tata)logger3列表。append(mama)logger4
所以,我终于想得到,MyList=妈妈
但是,如果我检查记录员:
logger1:[塔塔](好的)
日志2:[塔塔,莫莫:(仍然可以)
logger3:[toto](好像重新设置了列表)
logger4:[托托,妈妈:(所以不太好)
我认为问题来自于我在FME项目中有两个对象。对吗?
如何保存第一个更改?
我错过什么了吗?
我怀疑这个问题在Python论坛中更合适。
不管怎样,除非您发布整个代码并准确地告诉我们您想要实现什么,否则很难提供帮助。
def输入(self,feature):…myanswerfield=[('echelle1',没有)(‘梯队2’,无)使用此数据库:
如果feature.getattribute中的“01”(id_reseau):scale1=feature.getattribute('echelleSortiePlanPrincipal')myAnswerFields.remove('echelle1',none))myanswerfields.append('echelle1',scale1)如果feature.getattribute中的“02”,则返回值为“id\u resetu”:scale2=feature.getattribute(“echelleSortiePlanPrincipal”)myAnswerFields.remove(“echelle2”,none))myanswerfields.append('echelle2',第二级)
?2019安全亚搏在线软件公司|合法的