Changeset 3082 for branch/UMPA/umpa/protocols/base.py
- Timestamp:
- 07/04/08 18:45:23 (5 years ago)
- Files:
-
- 1 modified
-
branch/UMPA/umpa/protocols/base.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branch/UMPA/umpa/protocols/base.py
r3073 r3082 20 20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 21 22 import utils 23 22 24 class Protocol: 23 pass 25 def set_fields(self, *args, **kwargs): 26 '''You can use this method to set fields of the protocol. 27 There are 2 ways to do that with using tuple or dict-style. 28 ''' 29 30 # converting args list to the dict and update our kwargs 31 kwargs.update(utils.dict_from_sequence(args)) 32 33 for key in kwargs: 34 self.fields[key].set(kwargs[key]) 24 35 25 36 class Layer4(Protocol):
