Python implementation of surreal numbers