Commit 6cd6cde7 authored by Julien Muchembled's avatar Julien Muchembled

Sequence class: Add setdefault method and simplify code other methods to access sequence variables.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24868 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 43fb9e88
......@@ -120,16 +120,16 @@ class Sequence:
self._step_list.append(new_step)
def set(self, keyword, value):
self._dict[keyword]=value
self._dict[keyword] = value
def edit(self, **kw):
for k, v in kw.items():
self._dict[k]=v
def edit(self, *args, **kw):
if self._dict.update(*args, **kw)
def get(self, keyword,default=None):
if self._dict.has_key(keyword):
return self._dict[keyword]
return default
def get(self, *args, **kw):
if self._dict.get(*args, **kw)
def setdefault(self, *args, **kw):
if self._dict.setdefault(*args, **kw)
class SequenceList:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment