From bcc4d54cff6df0e6298620444a2bc75b1e39c909 Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Wed, 25 Oct 2006 14:27:12 +0000 Subject: [PATCH] - 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" --- PLC/Parameter.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/PLC/Parameter.py b/PLC/Parameter.py index 5f573f8..9ae6486 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 -- 2.43.0