#19575: Conversion PARI t_STR -> Python str should not keep quotes
-------------------------------------+-------------------------------------
       Reporter:  jdemeyer           |        Owner:
           Type:  defect             |       Status:  needs_work
       Priority:  major              |    Milestone:  sage-6.10
      Component:  interfaces:        |   Resolution:
  optional                           |    Merged in:
       Keywords:                     |    Reviewers:  Peter Bruin
        Authors:  Jeroen Demeyer     |  Work issues:
Report Upstream:  N/A                |       Commit:
         Branch:                     |  29128c2ada7a6465d470336dbcc0e8061ea497f4
  u/jdemeyer/str_pari_gen            |     Stopgaps:
   Dependencies:                     |
-------------------------------------+-------------------------------------
Changes (by pbruin):

 * status:  needs_review => needs_work
 * reviewer:   => Peter Bruin


Comment:

 - The patchbot reports a doctest failure in
 `sage.interfaces.interface.InterfaceElement.__reduce__`.  I think the
 quoted version `"abc"` is the correct output.  Probably `gen.__reduce__()`
 should use `__repr__()` instead of `__str__()`.
 - It would look better to use `%r` in the error message that you change in
 the patch, and actually I would also prefer putting a space after the `=`,
 i.e.
 {{{
 raise TypeError("x (= %r) must be of type t_INT, but is of type %s" % (x,
 x.type()))
 }}}
 (For the second point, maybe we can even remove the type check and rely on
 PARI to raise an error.)

--
Ticket URL: <http://trac.sagemath.org/ticket/19575#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to