Add in support for AbsentValues.

This commit is contained in:
Mike Auty
2018-03-08 00:26:25 +00:00
parent 3f37ab760c
commit de9ad62412
3 changed files with 42 additions and 8 deletions
+9 -1
View File
@@ -73,9 +73,17 @@ class TreeNode(collections.Sequence, metaclass = ABCMeta):
"""
class BaseAbsentValue(object):
"""Class that represents values which are not present for some reason"""
_Type = typing.TypeVar("_Type")
ColumnsType = typing.List[typing.Tuple[str, typing.Type]]
SimpleTypes = typing.Union[typing.Type[int], typing.Type[str], typing.Type[float], typing.Type[bytes]]
SimpleTypes = typing.Union[typing.Type[int],
typing.Type[str],
typing.Type[float],
typing.Type[bytes],
typing.Type[BaseAbsentValue]]
VisitorSignature = typing.Callable[[TreeNode, _Type], _Type]