Dynamically resolving __contains__ on each call is wasteful since set has a public PySet_Contains function.