Ticket #13900: pbori_remove_change_ordering.patch

File pbori_remove_change_ordering.patch, 2.0 KB (added by AlexanderDreyer, 10 years ago)

Removing unused (and dangerous) _change_ordering from BooleanPolynomialRing

  • sage/rings/polynomial/pbori.pyx

    # HG changeset patch
    # User Alexander Dreyer <adreyer@gmx.de>
    # Date 1357164626 -3600
    # Node ID 89c37e242e32d8b3dd538a1a0dd1742f8a7cd30d
    # Parent  e4f128f727a1348e70e62044f4258d2196c2a821
    Removing unused (and dangerous) _change_ordering from BooleanPolynomialRing (Sage Trac #13900)
    
    diff --git a/sage/rings/polynomial/pbori.pyx b/sage/rings/polynomial/pbori.pyx
    a b  
    16051605        for elt in blocks:
    16061606            self._pbring.ordering().appendBlock(elt)
    16071607
    1608     def _change_ordering(self, int order):
    1609         r"""
    1610         Change the ordering of this boolean polynomial ring. Do NOT call
    1611         this method, unless you know very well what you are doing.
    1612        
    1613         INPUT:
    1614        
    1615        
    1616         -  ``order`` - an integer (0 = order = 4)
    1617        
    1618        
    1619         EXAMPLE::
    1620        
    1621             sage: B.<x,y,z> = BooleanPolynomialRing(3,order='deglex')
    1622             sage: y*z > x
    1623             True
    1624        
    1625         Now we call the internal method and change the ordering to 'lex'::
    1626        
    1627             sage: B._change_ordering(0)
    1628             sage: y*z > x
    1629             False
    1630        
    1631         However, this change is not - and should not be - picked up by the
    1632         public interface.
    1633        
    1634         ::
    1635        
    1636             sage: B.term_order()
    1637             Degree lexicographic term order
    1638 
    1639        Resetting ordering
    1640        
    1641         ::
    1642 
    1643             sage: B._change_ordering(1)
    1644             sage: y*z > x
    1645             True
    1646                
    1647         .. warning::
    1648 
    1649            Do not use this method. It is provided for compatibility
    1650            reasons with PolyBoRi but parents are supposed to be
    1651            immutable in Sage.
    1652         """
    1653         if order < 0 or order > 4:
    1654             raise ValueError, "order value %s is not supported"%(order)
    1655         self._pbring.changeOrdering(<ordercodes>order)
    1656 
    1657 
    1658 
    16591608    def one(self):
    16601609        """
    16611610        EXAMPLES::