def int(self, space): if (type(self) is not W_LongObject and space.is_overloaded(self, space.w_long, '__int__')): return W_Root.int(self, space) try: return space.newint(self.num.toint()) except OverflowError: return self.descr_long(space)
def int(self, space): if (type(self) is not W_LongObject and space.is_overloaded(self, space.w_long, '__int__')): return W_Root.int(self, space) try: return space.newint(self.num.toint()) except OverflowError: return self.descr_long(space)
def int(self, space): if (type(self) is not W_FloatObject and space.is_overloaded(self, space.w_float, '__int__')): return W_Root.int(self, space) try: value = ovfcheck_float_to_int(self.floatval) except OverflowError: return space.long(self) else: return space.newint(value)
def int(self, space): if type(self) is W_LongObject: return self if not space.is_overloaded(self, space.w_int, '__int__'): return W_LongObject(self.num) return W_Root.int(self, space)
def int(self, space): if type(self) is W_IntObject: return self if not space.is_overloaded(self, space.w_int, '__int__'): return space.newint(self.intval) return W_Root.int(self, space)
def int(self, space): # this is a speed-up only, for space.int(w_float). if type(self) is not W_FloatObject and space.is_overloaded(self, space.w_float, "__int__"): return W_Root.int(self, space) return self.descr_trunc(space)
def int(self, space): if type(self) is W_LongObject: return self if not space.is_overloaded(self, space.w_int, '__int__'): return W_LongObject(self.num) return W_Root.int(self, space)
def int(self, space): # this is a speed-up only, for space.int(w_float). if (type(self) is not W_FloatObject and space.is_overloaded(self, space.w_float, '__int__')): return W_Root.int(self, space) return self.descr_trunc(space)
def int(self, space): if type(self) is W_IntObject: return self if not space.is_overloaded(self, space.w_int, '__int__'): return space.newint(self.intval) return W_Root.int(self, space)