From: Mark Huang Date: Wed, 25 Oct 2006 14:27:12 +0000 (+0000) Subject: - remove "default" attribute X-Git-Tag: pycurl-7_13_1~458 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=bcc4d54cff6df0e6298620444a2bc75b1e39c909;p=plcapi.git - remove "default" attribute - allow "optional" to be None (and set it to None by default), which means "unknown whether this sub-parameter is optional or not" --- diff --git a/PLC/Parameter.py b/PLC/Parameter.py index 5f573f88..9ae64869 100644 --- a/PLC/Parameter.py +++ b/PLC/Parameter.py @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: Parameter.py,v 1.2 2006/09/08 19:45:04 mlhuang Exp $ +# $Id: Parameter.py,v 1.3 2006/10/02 18:32:31 mlhuang Exp $ # class Parameter: @@ -16,7 +16,7 @@ class Parameter: def __init__(self, type, doc = "", min = None, max = None, - optional = True, default = None, + optional = None, ro = False): # Basic type of the parameter. May be a builtin type or Mixed. self.type = type @@ -30,10 +30,9 @@ class Parameter: self.min = min self.max = max - # Whether the sub-parameter is optional or not. If optional, - # the default for the sub-parameter if not specified. + # Whether the sub-parameter is optional or not. If None, + # unknown whether it is optional. self.optional = optional - self.default = default # Whether the DB field is read-only. self.ro = ro