expose contains method (fixes infinite recursion in py3k)