Skip to content

Loading…

yield and ASSERTION ERROR #7

Closed
myroslav opened this Issue · 0 comments

2 participants

@myroslav

When stepping through this program, on second iteration of for loop when entering iterator Tutor starts displaying ASSERTIOn ERRORs, but continues to work properly:

def fibonacci():
   a, b = 1, 2
   while True:
      yield a
      a, b = b, a+b

f = fibonacci()
for i in range(10):
    print f.next()
@pgbovine pgbovine closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.