I realized today while writing some Python that one could write the inequality operator as a!=b or not a==b. This got me curious:
- Do both ways behave exactly the same, or are there some subtle differences?
- Is there any reason to use one over the other? Is one more commonly used than the other?
==invokes__eq__().!=invokes__ne__()if it exists, otherwise is equivalent tonot ==.