On Fri, Aug 7, 2020, 6:03 PM Paul Moore email@example.com wrote:
x: int[0:] # any ints greater than or equal to zero would match, others
x: int[:101] # any ints less than 101 match x: int[0:101:2] # even less than 101
I suspect the biggest issue with this is that it's likely to be extremely hard (given the dynamic nature of Python) to check such type assertions statically.
Yes, it's hard in the sense that it would require solving the halting problem.