heynemann/pyvows — pull request #76 by Zearin (2013-02-11 18:50:05+00:00)
Title: Refactor/decorators module

# Notes

(Reopened from #75 due to a commit SNAFU that screwed up the build.)

## `pyvows.utils module`

To avoid circular imports, this also required the creation of *another* new module: `pyvows.utils`. However, I was thinking about putting all “helper code” into a central utilities module anyway, so `pyvows.utils` has more potential than this pull request might suggest.

## Caveats

The refactoring definitely isn’t perfect. Most are actually “almost-complete” implementations, which are almost (but not quite!) useable as-is. To distinguish these from decorators which can be imported and used anywhere, I underscore-prefixed them.

Eventually, I hope `pyvows.decorators` will be refined to the point that most (all?) of the decorators can be imported anywhere and used without modification.

## Benefits

For now, I think it’s nice to be able to have a central module where we can examine **all** of pyvows’ decorators at once.

I also hope that the presence of a `decorators` module will inspire any new decorators to be written such that they have loose-coupling (hopefully encouraging code reusability).