summaryrefslogtreecommitdiff
path: root/Lib/python/std_pair.i
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/python/std_pair.i')
-rw-r--r--Lib/python/std_pair.i22
1 files changed, 12 insertions, 10 deletions
diff --git a/Lib/python/std_pair.i b/Lib/python/std_pair.i
index 782969574..73d47e198 100644
--- a/Lib/python/std_pair.i
+++ b/Lib/python/std_pair.i
@@ -176,18 +176,20 @@ SwigPython_std_pair_setitem (PyObject *a, Py_ssize_t b, PyObject *c)
%define %swig_pair_methods(pair...)
#if !defined(SWIGPYTHON_BUILTIN)
%extend {
-%pythoncode {def __len__(self): return 2
-def __repr__(self): return str((self.first, self.second))
+%pythoncode {def __len__(self):
+ return 2
+def __repr__(self):
+ return str((self.first, self.second))
def __getitem__(self, index):
- if not (index % 2):
- return self.first
- else:
- return self.second
+ if not (index % 2):
+ return self.first
+ else:
+ return self.second
def __setitem__(self, index, val):
- if not (index % 2):
- self.first = val
- else:
- self.second = val}
+ if not (index % 2):
+ self.first = val
+ else:
+ self.second = val}
}
#endif
%enddef