#11463: Add a Sage vs. Python FAQ
-----------------------------+----------------------------------------------
   Reporter:  hivert         |          Owner:  hivert        
       Type:  enhancement    |         Status:  needs_review  
   Priority:  minor          |      Milestone:  sage-4.7.1    
  Component:  documentation  |       Keywords:  FAQ           
Work_issues:                 |       Upstream:  N/A           
   Reviewer:                 |         Author:  Florent Hivert
     Merged:                 |   Dependencies:                
-----------------------------+----------------------------------------------

Comment(by nbruin):

 In the patch it says:
 "In Python 1 is a machine integer ``int`` (32 or 64 bits depending on your
 machine) and ``Integer(1)`` is ..."
 That's not quite true. Python's "int" type is a bit shorter than the
 machine word length and they automatically extend to "long" in case of
 overflow. In Python 3, the only type visible is "int" and whether you have
 one or the other is an implementation detail.

 Note that http://docs.python.org/library/stdtypes.html is a bit
 misleading: Yes, python int is implemented via C-style "long" but that
 doesn't imply that maxint is the typical maxint for 64 or 32 bit:
 {{{
 >>> import sys
 >>> sys.maxint
 9223372036854775807
 >>> 2**63
 9223372036854775808L
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11463#comment:6>
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