Use python's items() instead of custom one, fixes #49