Consider:
model1 = cobra.Model("M1")
model1.add_reactions([cobra.Reaction("R1")])
model2 = cobra.Model("M2")
model2.add_reactions(model1.reactions)
print(model1.reactions.R1.bounds)
model2.reactions.R1.bounds = (500,600)
print(model1.reactions.R1.bounds)
which prints:
We would have expected that changing a reaction on model2 would have no effect on model1.
But actually those reactions are the same.
In fact:
print(model1.reactions.R1.model is model2)
prints True.
Probably add_reactions should always create a copy if reaction.model is set?
Related: #673