Hi Christoph, On Thu, Dec 18, 2008 at 13:00, Christoph Zwerschke <[email protected]> wrote: > By the way, one (new) useful feature of Python's startswith is that you > can also pass a tuple of substrings (prefixes) instead of only one. So > maybe you can accept arrays as well.
Ah, nice - I didn't know about this feature of startswith. > And I would also make the actual > string the first argument (kind of "self"). Then you can also easily add > more parameters (like optional start and end index for the search etc.). For this part, see me previous message in this thread about the partial(...) use case. Partially applying the needle looks much more common than partially applying the haystack (or at least that is my gut feeling). Again, if we get a more generic partial(..) this becomes a non-issue. cheers, Arnar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MochiKit" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mochikit?hl=en -~----------~----~----~----~------~----~------~--~---
