erikrose/more-itertools — pull request #37 by jaraco (2014-04-06 01:48:07+00:00)
Title: Always iterable

The `always_iterable` function is one of my favorite functions. I use it time and time again in unexpected scenarios.

Often, when a parameter is allowed to be a string or None, but also an iterable, one has to set up a series of tests and transformation. Using always_iterable means the logic can be greatly simplified and more intuitive, simply iterating over the (possibly empty) result.

I've tried to communicate this value in the docstring.

I've also back-ported it to support Python 2.7 first without six.