R. David Murray added the comment:
You did request a tuple:
r = a - q * b,
That is equivalent to
r = (a - q * b,)
which is a single element tuple.
I had to put in some print statements in your loop to find that, it wasn't
obvious. This is perhaps a disadvantage of Python's tuple notation, but the
benefits of the notation outweigh this small disadvantage, I think.
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
type: crash -> behavior
Python tracker <rep...@bugs.python.org>
Python-bugs-list mailing list