0

I have a function which takes fixed length lists or tuples and I was wondering how I should type hint them. So, the function signature is:

def order_pts(pt1: Iterable, pt2: Iterable, pt3: Iterable)

Where each of these are basically 2-dimensional tuples/list. I can annotate them as Iterable but I am not sure how to specify that these are 2 element collections?

Adirio
  • 5,040
  • 1
  • 14
  • 26
Luca
  • 10,458
  • 24
  • 107
  • 234

0 Answers0