kachayev/fn.py — pull request #12 by K900 (2013-01-21 15:47:58+00:00)
Title: Update/fix Python 3 compatibility

* all: Changed sys.version checks to sys.version_info equivalents
* iters: Made Python 2-specific imports conditional
* op: Fixed _apply to work properly when args=None
* stream: Conditional maxint/maxsize usage in Python 2/3
* underscore: Conditional operator.div/operator.truediv in Python 2/3
* tests: Explicitly convert ranges to lists
* tests: Run tests if tests.py is called directly

All tests pass on Python 3.3 and Python 2.7, should also work on previous versions.