草庐IT

reactionsDict

全部标签

python - Python 字典的顺序是否在迭代中得到保证?

我目前正在使用SciPy.integrate.ode在Python中实现一个复杂的微生物食物网。.我需要能够轻松地将物种和react添加到系统中,所以我必须编写一些非常通用的代码。我的方案如下所示:classReaction(object):def__init__(self):#stuffcommontoallreactionsdef__getReactionRate(self,**kwargs):raiseNotImplementedError...Reactionsubclassesthat...implementspecifictypesofreactionsclassSpeci

python - Python 字典的顺序是否在迭代中得到保证?

我目前正在使用SciPy.integrate.ode在Python中实现一个复杂的微生物食物网。.我需要能够轻松地将物种和react添加到系统中,所以我必须编写一些非常通用的代码。我的方案如下所示:classReaction(object):def__init__(self):#stuffcommontoallreactionsdef__getReactionRate(self,**kwargs):raiseNotImplementedError...Reactionsubclassesthat...implementspecifictypesofreactionsclassSpeci