self.assertEqual(d1.keys() & set(d1.keys()), {'a', 'b'})
self.assertEqual(d1.keys() & set(d2.keys()), {'b'})
self.assertEqual(d1.keys() & set(d3.keys()), set())
+ self.assertEqual(d1.keys() & tuple(d1.keys()), {'a', 'b'})
self.assertEqual(d1.keys() | d1.keys(), {'a', 'b'})
self.assertEqual(d1.keys() | d2.keys(), {'a', 'b', 'c'})
self.assertEqual(d1.keys() | set(d2.keys()), {'a', 'b', 'c'})
self.assertEqual(d1.keys() | set(d3.keys()),
{'a', 'b', 'd', 'e'})
+ self.assertEqual(d1.keys() | (1, 2), {'a', 'b', 1, 2})
self.assertEqual(d1.keys() ^ d1.keys(), set())
self.assertEqual(d1.keys() ^ d2.keys(), {'a', 'c'})
self.assertEqual(d1.keys() ^ set(d2.keys()), {'a', 'c'})
self.assertEqual(d1.keys() ^ set(d3.keys()),
{'a', 'b', 'd', 'e'})
+ self.assertEqual(d1.keys() ^ tuple(d2.keys()), {'a', 'c'})
self.assertEqual(d1.keys() - d1.keys(), set())
self.assertEqual(d1.keys() - d2.keys(), {'a'})
self.assertEqual(d1.keys() - set(d1.keys()), set())
self.assertEqual(d1.keys() - set(d2.keys()), {'a'})
self.assertEqual(d1.keys() - set(d3.keys()), {'a', 'b'})
+ self.assertEqual(d1.keys() - (0, 1), {'a', 'b'})
self.assertFalse(d1.keys().isdisjoint(d1.keys()))
self.assertFalse(d1.keys().isdisjoint(d2.keys()))
if (result == NULL)
return NULL;
- tmp = _PyObject_CallMethodId(result, &PyId_difference_update, "O", other);
+ tmp = _PyObject_CallMethodIdObjArgs(result, &PyId_difference_update, other, NULL);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;
if (result == NULL)
return NULL;
- tmp = _PyObject_CallMethodId(result, &PyId_intersection_update, "O", other);
+ tmp = _PyObject_CallMethodIdObjArgs(result, &PyId_intersection_update, other, NULL);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;
if (result == NULL)
return NULL;
- tmp = _PyObject_CallMethodId(result, &PyId_update, "O", other);
+ tmp = _PyObject_CallMethodIdObjArgs(result, &PyId_update, other, NULL);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;
if (result == NULL)
return NULL;
- tmp = _PyObject_CallMethodId(result, &PyId_symmetric_difference_update, "O",
- other);
+ tmp = _PyObject_CallMethodIdObjArgs(result, &PyId_symmetric_difference_update, other, NULL);
if (tmp == NULL) {
Py_DECREF(result);
return NULL;