[ python-Feature Requests-1191699 ] make slices pickable

SourceForge.net noreply at sourceforge.net
Sat Apr 30 20:02:49 CEST 2005


Feature Requests item #1191699, was opened at 2005-04-28 13:44
Message generated for change (Comment added) made by sdementen
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1191699&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Sebastien de Menten (sdementen)
Assigned to: Nobody/Anonymous (nobody)
Summary: make slices pickable

Initial Comment:
As suggested  by the summary, provide pickability of 
slices by default.
Currently one has to use copy_reg module to register 
slices as pickables.

----------------------------------------------------------------------

>Comment By: Sebastien de Menten (sdementen)
Date: 2005-04-30 18:02

Message:
Logged In: YES 
user_id=820079

Use case for pickable slices. 
Let A be a numeric array of size M x N. We want to consider 
sub-arrays in this array like A[:4, :] (the first 4 lines of the 
array). 
If we want to store both the array and the information of 
sub-arrays structures, we need to store slices (we can also 
store start/end indices of the array ... but this is call a slice 
so it would be better to have pickable slices). 
 
In fact, whenever one wants to write generic algorithm 
working on "sublist of lists" or "subarrays of arrays" or 
"sub-items of collection of items", it is nicer to use slice 
objects explicitly and so store them also explicitly. 
 

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2005-04-30 12:32

Message:
Logged In: YES 
user_id=80475

Use cases?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=1191699&group_id=5470


More information about the Python-bugs-list mailing list