You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I understand a list containing a single element can be checked as the document states as follows:
A list containing a single element, requiring that the value be a list of values, all matching the type signature of that element. For example, a type signature specifying a list of integers would be [int].
I was wondering if it is possible to check for a list containing multiple elements. For example, if a function expects a 2D coordinate, it would require the following type:
[int, int]
More precisely, I would like to check for the following type:
typedecorator.Union((int, int), [int, int])
but that does not seem possible as I'm getting TypeError: Invalid type signature. If I change my code a bit like:
typedecorator.Union((int, int), list)
it seems working okay but that's not quite what I want.
The text was updated successfully, but these errors were encountered:
I understand a list containing a single element can be checked as the document states as follows:
I was wondering if it is possible to check for a list containing multiple elements. For example, if a function expects a 2D coordinate, it would require the following type:
More precisely, I would like to check for the following type:
but that does not seem possible as I'm getting
TypeError: Invalid type signature
. If I change my code a bit like:it seems working okay but that's not quite what I want.
The text was updated successfully, but these errors were encountered: