Static typing in pyDatalog: Possible?

75 Views Asked by At

For instance, using the mypy library, one can specify that a function inputs a string and outputs a string, like this:

def greeting(name: str) -> str:
    return 'Hello, {}'.format(name)

In pyDatalog, one can define (say) a unary function a single value at a time, like this:

+(favoriteWords[0] == "cats")

Is there some way to specify that the argument to favoriteWords must be a single integer, and the output must be a string?

1

There are 1 best solutions below

2
Pierre Carbonnelle On

Unfortunately, this is currently not supported by pyDatalog.