Closed baluyotraf closed 1 year ago
Many thanks for this @baluyotraf . I'm kinda surprised iter()
on a Row object runs at all. After all, the underlying function "tp_iter" hasn't actually been coded up. But hey, it works! So yes, adding __iter__
to the Row class to formalize this is a good idea.
Yeah I actually tried to play around it a bit to see if Row
returns a more specific iterator. But I only got a generic one so I used it on the type. xD
Using
Row
as an iterable in code results in this typing issue. For example:The code above works fine, but it gives the typing error below
This can be worked around currently by casting the
Row
object manuallyThis fix simply adds the
__iter__
method in the typing definition.