This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: mmap needs a rfind method
Type: enhancement Stage:
Components: Extension Modules Versions:
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: akuchling Nosy List: Chipaca, akuchling, georg.brandl, nicholas.riley
Priority: normal Keywords: easy, patch

Created on 2004-06-21 16:59 by nicholas.riley, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit
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 (6)
msg54183 - (view) Author: Nicholas Riley (nicholas.riley) * 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 
msg54184 - (view) Author: A.M. Kuchling (akuchling) * (Python committer) Date: 2004-06-29 13:37
Logged In: YES 

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 (georg.brandl) * (Python committer) Date: 2005-06-26 21:13
Logged In: YES 

Moving to the RFE tracker.
msg60194 - (view) Author: John Rowland 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 Rowland 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) * (Python committer) 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 .
Date User Action Args
2022-04-11 14:56:04adminsetgithub: 40427
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:54nicholas.rileycreate