Ticket #3962: trac_3962-3.patch

File trac_3962-3.patch, 2.3 kB (added by jason, 3 months ago)
  • a/sage/calculus/calculus.py

    old new  
    40914091                if isinstance(self._obj, int): 
    40924092                    return True 
    40934093 
     4094    def __index__(self): 
     4095        """ 
     4096        EXAMPLES: 
     4097            sage: a = range(10) 
     4098            sage: a[:SR(5)] 
     4099            [0, 1, 2, 3, 4] 
     4100        """ 
     4101        return int(Integer(self)) 
     4102 
    40944103    def _fast_float_(self, *vars): 
    40954104        """ 
    40964105        Returns an object which provides fast floating point evaluation of  
  • a/sage/modules/free_module.py

    old new  
    38873887            sage: W = V.submodule_with_basis([[1,1,0],[0,2,1]]) 
    38883888            sage: W._echelonized_basis(V,W.basis()) 
    38893889            [(1, 0, -1/2), (0, 1, 1/2)] 
     3890            sage: V = SR^3  
     3891            sage: W = V.submodule_with_basis([[1,0,1]])  
     3892            sage: W._echelonized_basis(V,W.basis())  
     3893            [(1, 0, 1)] 
     3894 
    38903895        """ 
    38913896        # Return the first rank rows (i.e., the nonzero rows). 
    38923897        d = self._denominator(basis) 
  • a/sage/structure/element.pyx

    old new  
    14561456 
    14571457        TESTS: 
    14581458            sage: 2r**(SR(2)-1-1r) 
     1459            1 
     1460            sage: 2r**(SR(1/2)) 
    14591461            Traceback (most recent call last): 
    14601462            ... 
    1461             NotImplementedError: non-integral exponents not supported 
    1462             sage: 2r**(Integer(SR(2)-1-1r)) 
    1463             1 
    1464  
    1465  
     1463            NotImplementedError: non-integral exponents not supported  
    14661464        """ 
    14671465        if dummy is not None: 
    14681466            raise RuntimeError, "__pow__ dummy argument not used"