def to_int(self, number, default=0):
        """Returns an integer
        """
        try:
            return int(number)
        except (KeyError, ValueError):
            return self.to_int(default, 0)
def to_int ( self , number , default = 0 ) : try : return int ( number ) except ( KeyError , ValueError ) : return self . to_int ( default , 0 )
Returns an integer