I think this would mostly be backwards compatible by adding optional constructor parameters:
class GPString():
def __init__(self,paramName=None,value=None):
self.paramName=paramName
self.value=value
As a side note, adding getters and setters for attributes that do nothing more than get/set really should be removed and just refer to the attribute its self. Eg:
@property
def value(self):
"""represents the object as a dictionary"""
return self._value
#----------------------------------------------------------------------
@value.setter
def value(self, value):
"""gets/sets the object as a dictionary"""
self._value = value
Is better as:
def __init__(self):
self.value=None
Not to mention that, paramName's getter/setter, which does a simple str type check, should really be moved to the base class instead of repeated. There are many things in this code that would make it much more readable and maintainable and this would definitely help encourage contributions from others.
It would be great to be able to create GPObjects for submitting a job in one step instead of three lines. Currently:
Would be better to have this option:
I think this would mostly be backwards compatible by adding optional constructor parameters:
As a side note, adding getters and setters for attributes that do nothing more than get/set really should be removed and just refer to the attribute its self. Eg:
Is better as:
Not to mention that, paramName's getter/setter, which does a simple str type check, should really be moved to the base class instead of repeated. There are many things in this code that would make it much more readable and maintainable and this would definitely help encourage contributions from others.