MCPcopy Create free account
hub / github.com/ronreiter/interactive-tutorials / nvl

Method nvl

suds/properties.py:160–171  ·  view source on GitHub ↗

Convert the I{value} into the default when I{None}. @param value: The proposed value. @type value: any @return: The I{default} when I{value} is I{None}, else I{value}. @rtype: any

(self, value=None)

Source from the content-addressed store, hash-verified

158 self.linker = linker
159
160 def nvl(self, value=None):
161 """
162 Convert the I{value} into the default when I{None}.
163 @param value: The proposed value.
164 @type value: any
165 @return: The I{default} when I{value} is I{None}, else I{value}.
166 @rtype: any
167 """
168 if value is None:
169 return self.default
170 else:
171 return value
172
173 def validate(self, value):
174 """

Callers 1

__setMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected