Revision e055a2ab lib/ht.py
b/lib/ht.py | ||
---|---|---|
187 | 187 |
return val is None |
188 | 188 |
|
189 | 189 |
|
190 |
@WithDesc("ValueNone") |
|
191 |
def TValueNone(val): |
|
192 |
"""Checks if the given value is L{constants.VALUE_NONE}. |
|
193 |
|
|
194 |
""" |
|
195 |
return val == constants.VALUE_NONE |
|
196 |
|
|
197 |
|
|
190 | 198 |
@WithDesc("Boolean") |
191 | 199 |
def TBool(val): |
192 | 200 |
"""Checks if the given value is a boolean. |
... | ... | |
319 | 327 |
return TOr(TNone, test) |
320 | 328 |
|
321 | 329 |
|
330 |
def TMaybeValueNone(test): |
|
331 |
"""Used for unsetting values. |
|
332 |
|
|
333 |
""" |
|
334 |
return TMaybe(TOr(TValueNone, test)) |
|
335 |
|
|
336 |
|
|
322 | 337 |
# Type aliases |
323 | 338 |
|
324 | 339 |
#: a non-empty string |
Also available in: Unified diff