#4974: [with patch, needs work] make sage.libs.pari.gen._normalize_slice a
miscellaneous function for dealing with slices
--------------------+-------------------------------------------------------
 Reporter:  jason   |        Owner:  craigcitro
     Type:  defect  |       Status:  assigned  
 Priority:  major   |    Milestone:  sage-3.3  
Component:  misc    |   Resolution:            
 Keywords:          |  
--------------------+-------------------------------------------------------
Changes (by craigcitro):

  * summary:  [with patch, needs review] make
              sage.libs.pari.gen._normalize_slice a
              miscellaneous function for dealing with slices
              => [with patch, needs work] make
              sage.libs.pari.gen._normalize_slice a
              miscellaneous function for dealing with slices

Comment:

 Jason Grout just brought up an example in IRC where exactly that would
 happen. Here's a case:

 {{{
 sage: range(3)[2::-1]
 [2, 1, 0]
 }}}

 `normalize_slice` will '''not''' return that, since it interprets a
 missing `stop` to be equal to `size`. This isn't documented as part of the
 Python semantics, but I think we should switch it to behave the same way
 regardless. (Also, it'll be easy to implement.)

 This is now `needs work` until I change this.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4974#comment:7>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of 
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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