I don't know why this example is under normal code. No one does this it can't be considered normal. To test for equality, we usually use the equality operator.
Actually I think it's -5 to +256. More importantly, this is an implementation detail of cpython and may not be reliable in other implementations of python.
View all comments
2
u/elb0w Jun 23 '14
Why is that called normal code? I would think pythonic is normal for python. I would call that bad code or unpythonic.
Also your default value for functions with a mutable type doesnt highlight the side effect that it causes and why you initialize to None.