Ticket #4036: trac_4036-fixes.patch

File trac_4036-fixes.patch, 1.3 KB (added by mhansen, 14 years ago)
  • sage/interfaces/expect.py

    # HG changeset patch
    # User Mike Hansen <mhansen@gmail.com>
    # Date 1221450441 25200
    # Node ID 7eaee99692e45700d5d6420d13b311cac311d088
    # Parent  ea5e227e288e199d297645d7ae0ab7d213724d0e
    [mq]: trac_4036-fixes.patch
    
    diff -r ea5e227e288e -r 7eaee99692e4 sage/interfaces/expect.py
    a b  
    970970            #interface by first going through Sage.
    971971            try:
    972972                return self(x._sage_())
    973             except NotImplementedError:
     973            except (NotImplementedError, TypeError):
    974974                pass
     975
    975976           
    976977        if isinstance(x, basestring):
    977978            return cls(self, x, name=name)
     
    13951396        except (RuntimeError, ExceptionPexpect), msg:    # needed to avoid infinite loops in some rare cases
    13961397            #print msg
    13971398            pass
    1398 
    1399     def _interface_(self, G):
    1400         """
    1401         We don't want to run any of the generic code for interface conversion.
    1402 
    1403         EXAMPLES:
    1404             sage: a = gp(1/2)
    1405             sage: a._interface_(gp)
    1406             Traceback (most recent call last):
    1407             ...
    1408             NotImplementedError
    1409         """
    1410         raise NotImplementedError
    14111399
    14121400    def _sage_(self):
    14131401        """