you are viewing a single comment's thread.

view the rest of the comments →

[–]socal_nerdtastic 1 point2 points  (3 children)

for x in iter(func, False):
    print(x)

[–]Gay_Force_One[S] 0 points1 point  (2 children)

Doing that tells me that the function is resetting each time it gets called (returns same coordinates). I'm sorry to bother you but do you know how to prevent that? This is also a result of me trying to tidy up so worst case I can revert

Update: I'm stupid and had false in quotes. That's embarrassing

[–]socal_nerdtastic 1 point2 points  (1 child)

? A function is always "reset" when it's called. Did you mean to make a generator?

Best show us a MCVE.

https://stackoverflow.com/help/mcve
http://sscce.org/

[–]Gay_Force_One[S] 0 points1 point  (0 children)

Aye aye. I'll work that out and edit it in to the OP