[ python-Feature Requests-1191699 ] make slices pickable

SourceForge.net noreply at sourceforge.net
Fri Jun 3 02:50:06 CEST 2005


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

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Sebastien de Menten (sdementen)
>Assigned to: Raymond Hettinger (rhettinger)
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: Raymond Hettinger (rhettinger)
Date: 2005-06-02 19:50

Message:
Logged In: YES 
user_id=80475

Okay, sounds reasonable.  Will implement when I have time.

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

Comment By: Sebastien de Menten (sdementen)
Date: 2005-04-30 13: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 07: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