>>> from maxmin_locals import maxmin_locals ---ini-ex >>> l = [1, 2, 3, 2, 1, 2, 3, 0, 2, 1] >>> it = iter(l) >>> itsol = maxmin_locals(it) >>> itsol == iter(itsol) and list(itsol) == [('max', 3, 2), ('min', 1, 4), ('max', 3, 6), ('min', 0, 7), ('max', 2, 8)] True ---fi-ex