Check out the 'bind' library for javascript's bind in Python!
https://github.com/jamesaud/interesting-code/tree/master/bind
In-order generator tree traversal using generators is pretty neat https://github.com/jamesaud/interesting-code/blob/master/binary-search-tree-advanced.py#L110