Changeset 5489:d56640da7b08


Ignore:
Timestamp:
07/23/07 17:49:43 (6 years ago)
Author:
Robert Bradshaw <robertwb@…>
Branch:
default
Message:

almost all doctests passing

Location:
sage
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • sage/groups/perm_gps/permgroup_element.py

    r5485 r5489  
    222222            self.__gap = str(g) 
    223223        if parent is None: 
    224             parent = permgroup_named.SymmetricGroup(self._gap_().LargestMovedPoint()) 
     224            parent = SymmetricGroup(self._gap_().LargestMovedPoint()) 
    225225        element.Element.__init__(self, parent) 
    226226 
  • sage/modules/free_module_element.pyx

    r5487 r5489  
    873873 
    874874    cdef ModuleElement _rmul_c_impl(self, RingElement left): 
     875        """ 
     876        EXAMPLES:  
     877            sage: V = ZZ['x']^5 
     878            sage: 5 * V.0 
     879            (5, 0, 0, 0, 0) 
     880        """ 
    875881        if left._parent is self._parent._base: 
    876882            v = [left._mul_c(<RingElement>x) for x in self._entries] 
    877883        else: 
    878             v = [left * x for x in v] 
     884            v = [left * x for x in self._entries] 
    879885        return self._new_c(v) 
    880886 
     
    883889            v = [(<RingElement>x)._mul_c(right) for x in self._entries] 
    884890        else: 
    885             v = [x * right for x in v] 
     891            v = [x * right for x in self._entries] 
    886892        return self._new_c(v) 
    887893 
  • sage/structure/coerce.pyx

    r5488 r5489  
    365365         
    366366        if op is operator.div: 
     367            try: 
     368                K = S.fraction_field() 
     369            except AttributeError: 
     370                K = S 
     371             
    367372            if PY_TYPE_CHECK(S, Parent): 
    368                 action = (<Parent>S).get_action_c(R, operator.mul, False) 
    369                 if action is not None and action.actor() is S: 
     373                action = (<Parent>K).get_action_c(R, operator.mul, False) 
     374                if action is not None and action.actor() is K: 
    370375                    try: 
    371376                        return ~action 
     
    373378                        pass 
    374379            if PY_TYPE_CHECK(R, Parent): 
    375                 action = (<Parent>R).get_action_c(S, operator.mul, True) 
    376                 if action is not None and action.actor() is S: 
     380                action = (<Parent>R).get_action_c(K, operator.mul, True) 
     381                if action is not None and action.actor() is K: 
    377382                    try: 
    378383                        return ~action 
     
    445450        # implemented with the assumption that 
    446451        # _rmul_ is given an element of the basering 
     452#        print "G", G 
     453#        print "S", S 
    447454        if G is not S.base() and S.base() is not S: 
    448455            self.connecting = S.base().coerce_map_from(G) 
  • sage/structure/parent_base.pyx

    r5482 r5489  
    325325        cdef ParentWithBase self_b 
    326326        self_b = self._base 
    327         if self_b is self: 
     327        if self_b is self or self_b is None: 
    328328            return None 
    329329        try: 
Note: See TracChangeset for help on using the changeset viewer.