python and ruby: tuple unpaking