

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
3 messages in org.python.python-bugs-list[ python-Feature Requests-721061 ] Ad...| From | Sent On | Attachments |
|---|---|---|
| SourceForge.net | Mar 13, 2004 8:01 pm | |
| SourceForge.net | Mar 13, 2004 8:03 pm | |
| SourceForge.net | Mar 14, 2004 1:02 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [ python-Feature Requests-721061 ] Add copyrange method to array. | Actions... |
|---|---|---|
| From: | SourceForge.net (nore...@sourceforge.net) | |
| Date: | Mar 14, 2004 1:02:45 am | |
| List: | org.python.python-bugs-list | |
Feature Requests item #721061, was opened at 2003-04-14 07:41 Message generated for change (Comment added) made by rhettinger You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=721061&group_id=5470
Category: Extension Modules Group: None
Status: Closed Resolution: Rejected
Priority: 5 Submitted By: Neil Hodgson (nyamatongwe) Assigned to: Nobody/Anonymous (nobody) Summary: Add copyrange method to array.
Initial Comment: The split buffer data structure commonly used in text editors to efficiently manipulate text and data attached to that text can be implemented using the Python array type with the addition of a way to rapidly copy data within arrays. There may be other situations in which rapidly copying blocks within an array is useful.
-- Neil Hodgson
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger)
Date: 2004-03-14 01:03
Message: Logged In: YES user_id=80475
The 'text' class is likely the way to go.
I see your point about the extra object creation. However, given that there is currently a way (not a good) to do it, does the use case warrant the addition of non general purpose method. I don't think so; even lists don't have copyrange().
Am closing this request. If you change your mind and decide that this is an essential addition, feel free to re-open it.
----------------------------------------------------------------------
Comment By: Neil Hodgson (nyamatongwe) Date: 2004-03-13 17:46
Message: Logged In: YES user_id=12579
If you are asking how the copyrange differs from a sliced copy like
import array a = array.array("c", "0123456789") a array('c', '0123456789') a[5:8] = a[0:3] a
array('c', '0123401289')
There is an extra object creation and copy for the temporary slice. I think the actual copy between slices of the same type is fast. Possibly the original patch was lost so it can be found at http://scintilla.sourceforge.net/arraycopyrange.diff I didn't chase this much before as it may be better for me to produce a 'text' class that combines more features into an efficient mutable document type.
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger) Date: 2004-03-13 16:44
Message: Logged In: YES user_id=80475
How does this differ from slice semantics?
----------------------------------------------------------------------
Comment By: Raymond Hettinger (rhettinger) Date: 2003-05-22 02:44
Message: Logged In: YES user_id=80475
Moving to feature requests.
----------------------------------------------------------------------
You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=355470&aid=721061&group_id=5470







