classification
Title: mmap needs a rfind method
Type: feature request
Components: Extension Modules Versions:
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: akuchling Nosy List: Chipaca, akuchling, birkenfeld, nriley
Priority: normal Keywords: easy, patch

Created on 2004-06-21 16:59 by nriley, last changed 2008-01-19 18:25 by akuchling.

Files
File name Uploaded Description Edit Remove
mmap.rfind.patch Chipaca, 2008-01-19 16:54 Patch against revision 60082.
mmap.rfind.patch Chipaca, 2008-01-19 17:15 New patch, with small change after being reviewed by amk. Still against revision 60082.
Messages
msg54183 (view) Author: Nicholas Riley (nriley) Date: 2004-06-21 16:59
It would be convenient to have an 'rfind' method equivalent to the 
string one; the only (slow, wasteful) alternative I can find is taking 
slices of the mmap, or using successive seek/read, followed by 
rindex.
msg54184 (view) Author: A.M. Kuchling (akuchling) Date: 2004-06-29 13:37
Logged In: YES 
user_id=11375

The best way of seeing an rfind() method would be to
implement it and submit a patch.  (Otherwise it's a feature
request, and processing bugs usually takes precendence over
implementing features.)
msg54185 (view) Author: Georg Brandl (birkenfeld) Date: 2005-06-26 21:13
Logged In: YES 
user_id=1188172

Moving to the RFE tracker.
msg60194 (view) Author: John Lenton (Chipaca) Date: 2008-01-19 16:54
Attached patch adds two things: an 'end' argument to find, and an
'rfind' method. This includes minimal tests for rfind, but as I actually
refactored find and rfind into a single method, tests covering find also
cover most of rfind :).  I added 'end' first because the refactoring
seemed more natural (symmetric?) after that. Also included are updated
docs, and NEWS.
msg60199 (view) Author: John Lenton (Chipaca) Date: 2008-01-19 17:15
New patch, with small change after being reviewed by amk. Still against
revision 60082.
msg60206 (view) Author: A.M. Kuchling (akuchling) Date: 2008-01-19 18:24
Committed to the 2.6 trunk in rev. 60086.  Thanks for your contribution!

Please sign and send in a contributor form whenever you have time; the
forms are at http://www.python.org/psf/contrib/ .
History
Date User Action Args
2008-01-19 18:25:58akuchlingsetstatus: open -> closed
keywords: + patch
resolution: accepted
2008-01-19 18:24:48akuchlingsetmessages: + msg60206
2008-01-19 17:54:18akuchlingsetassignee: akuchling
2008-01-19 17:15:29Chipacasetfiles: + mmap.rfind.patch
messages: + msg60199
2008-01-19 16:54:20Chipacasetfiles: + mmap.rfind.patch
nosy: + Chipaca
messages: + msg60194
2008-01-12 01:14:42akuchlingsetkeywords: + easy
2004-06-21 16:59:54nrileycreate