#11424: Build Integer from Unicode
--------------------------------+-------------------------------------------
   Reporter:  vdelecroix        |          Owner:  vdelecroix       
       Type:  defect            |         Status:  needs_review     
   Priority:  major             |      Milestone:  sage-4.7.1       
  Component:  basic arithmetic  |       Keywords:  Integer, unicode 
Work_issues:                    |       Upstream:  N/A              
   Reviewer:  Mariah Lenox      |         Author:  Vincent Delecroix
     Merged:                    |   Dependencies:                   
--------------------------------+-------------------------------------------
Changes (by vdelecroix):

  * status:  needs_work => needs_review


Old description:

> Currently, Sage fails to build Integer from Unicode
> {{{
> sage: Integer(u'1')
> TypeError Traceback (most recent call last)
> ...
> TypeError: unable to coerce <type 'unicode'> to an integer
> }}}
>
> The two lines patch attached to this ticket, allow such feature
> {{{
> sage: Integer(u'1')
> 1
> }}}

New description:

 Currently, Sage fails to build Integer from Unicode
 {{{
 sage: Integer(u'1')
 TypeError Traceback (most recent call last)
 ...
 TypeError: unable to coerce <type 'unicode'> to an integer
 }}}

 The two lines patch attached to this ticket, allow such feature
 {{{
 sage: Integer(u'1')
 1
 sage: Integer(u'0X13')
 19
 }}}

--

Comment:

 Replying to [comment:3 jdemeyer]:

 Thanks for comment.

 >  1. The commit message of the patch should be changed.

 I add the number of the ticket and a short description.

 >  2. Could you give a less trivial example in the doctest?  At least
 something with more than one digit and something hexadecimal
 ({{{Integer(u'0x2A')}}}) or so...

 Done.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11424#comment:4>
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to