Module lyaml.explicit
Functions
| bool (value) | Parse the value following an explicit !!bool tag. |
| float (value) | Parse the value following an explicit !!float tag. |
| int (value) | Parse the value following an explicit !!int tag. |
| null () | Parse an explicit !!null tag. |
| str (value) | Parse the value following an explicit !!str tag. |
Functions
- bool (value)
-
Parse the value following an explicit
!!booltag.Parameters:
- value token
Returns:
-
bool
boolean equivalent, if a valid value was recognized
Or
-
nil
otherwise, nil
Usage:
maybe_bool = explicit.bool(tagarg)
- float (value)
-
Parse the value following an explicit
!!floattag.Parameters:
- value token
Returns:
-
number
float equivalent, if a valid value was recognized
Or
-
nil
otherwise, nil
Usage:
maybe_float = explicit.float(tagarg)
- int (value)
-
Parse the value following an explicit
!!inttag.Parameters:
- value token
Returns:
-
int
integer equivalent, if a valid value was recognized
Or
-
nil
otherwise, nil
Usage:
maybe_int = explicit.int(tagarg)
- null ()
-
Parse an explicit
!!nulltag.Returns:
-
lyaml.null
Usage:
null = explicit.null(tagarg)
- str (value)
-
Parse the value following an explicit
!!strtag.Parameters:
- value string token
Returns:
-
string
value which was a string already
Usage:
tagarg = explicit.str(tagarg)