You weren't necessarily wrong, but the fact that these integers are fixed objects means that not all integers 'behave' the same. I should have been a bit more explicit in my response.You wrote that with integers everything would behave as expected, but it's not, because of these 262 fixed integer objects. Situations where this is a problem might be rare, but the use of the 'is' operator is certainly an issue.
print(a1 is a2)257
True <== this makes sense, because a=257 is evaluated on startupa5=set_a(300)
print(a5 is a6)300
False <== that's what I would intuitively expecta3=set_a(42)
print(a3 is a4)42
True <== that is unexpected
As said, not necessarily wrong, but certainly an issue that might be number 8 on your list of things to be careful with.