avocado.utils.params: Add copy() method

上级 bcda2ef5
......@@ -47,6 +47,12 @@ class Params(UserDict.IterableUserDict):
except ParamNotFound:
return None
def copy(self):
new_dict = {}
for key in self:
new_dict[key] = self[key]
return Params(new_dict)
def objects(self, key):
"""
Return the names of objects defined using a given key.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册