vandersonmota/model_mommy — pull request #125 by marcofucci (2013-09-20 14:48:47+00:00)
Title: Refactored Sequence, added IterableSequence

I was in the same situation discussed in #103 so I started refactoring the sequence logic.

I would like to change a few small things before you can merge but I wanted to know what you thought first.
Below changes and questions:

* Sequences is now a new module. There's a small backward compatibility to take into account ``mommy.Sequence`` which *might* print a warning as it would be better to import directly from sequences.

* `IterableSequence` takes an iterable as argument. If there is a mismatch between args numbers, the Sequence starts from the beginning. I think it's a nice shortcut (e.g. use ``['odd', 'even']`` and have them cycle).

* The ``Sequence`` object is a bit magic because it does different things depending on the type of the value passed. It would be better to use the explicit sequence types from now on and change the documentation so that people can get used to it.

* Finally, I'm not so happy about the names `incr` and `itera` but it would be good to have shortcuts to make them easier to use.

I would need to change the documentation as well at a certain point.