Taken from http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Python

def _num2deg(self, tile):
        """ Taken from http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Python """
        n = 2.0 ** tile.zoom
        lon_deg = tile.x / n * 360.0 - 180.0
        lat_rad = mod_math.atan(mod_math.sinh(mod_math.pi * (1 - 2 * tile.y / n)))
        lat_deg = mod_math.degrees(lat_rad)
        return (lat_deg, lon_deg)