This example looks interesting:
def first(items: list[Reading]) -> Reading:
return items[0] # a reference into the caller's list
How the compiler knows and checks if the returning reference is derived from one of arguments? What if a function returning a reference has more than one parameter? I my language I needed to implement a whole notation to allow describing relations between parameters and returned references, has TurboPython something similar?