Trivial cleanups (pep8).
Reuse iterConfigurations in iterSettings.
Provide __len__ API for class implementing __getitem__ .