Hi Per, On Wed, Dec 17, 2008 at 12:23, Per Cederberg <[email protected]> wrote: > I've just finished committing one of my planned additions to MochiKit > 1.5 -- a new MochiKit.Text module:
Excellent work, thank you! > 1. Collect more ideas and feedback (hence this email). One comment about startsWith, endsWith, contains etc.. currently they take first the haystack and then the needle (I'm talking about parameter order). Perhaps switching this could benefit the usecase where this is used with partial? my_namesakes = filter(partial(contains, 'Arnar'), list_of_names); If the generalized partial I posted a few days ago this doesn't matter, as it would be my_namesakes = filter(partial(contains, __, 'Arnar'), list_of_names); This reminds me of another idea, since it's unrelated to the text module I'll post it in a different thread. The module should define constants like ascii_chars, digits etc. as per http://www.python.org/doc/2.3/lib/module-string.html -- also split, join (although they are included in js as native methods - having functions can be convenient for map & friends). For padRight and padLeft - I prefer the Python names ljust, rjust (and center). 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 -~----------~----~----~----~------~----~------~--~---
