[mochikit] Re: Introducing the MochiKit.Text module

2008-12-17 Thread Arnar Birgisson
Hi Per, On Wed, Dec 17, 2008 at 12:23, Per Cederberg 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,

[mochikit] Re: Introducing the MochiKit.Text module

2008-12-17 Thread Per Cederberg
On Wed, Dec 17, 2008 at 5:11 PM, Arnar Birgisson wrote: > 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?

[mochikit] Re: Introducing the MochiKit.Text module

2008-12-17 Thread Arnar Birgisson
Hi, On Wed, Dec 17, 2008 at 17:32, Per Cederberg wrote: > Ah, well... I didn't look too hard into Python here. Just googled > various name ideas and picked the most popular one (think it was from > some MS API actually)... ;-) That's not such a bad method :) However, I feel MochiKit draws heavi

[mochikit] Re: Introducing the MochiKit.Text module

2008-12-17 Thread Amit Mendapara
It's very good addition :) especially the new formating functions. I'll improve my MochiKit.String module so that one can create String instance with the new formating patterns. Again, I'm too, agree with Arner. Try to follow Python conventions as much as possible. startsWith => startswith endsW

[mochikit] Re: Introducing the MochiKit.Text module

2008-12-17 Thread Per Cederberg
On Thu, Dec 18, 2008 at 6:15 AM, Amit Mendapara wrote: > Again, I'm too, agree with Arner. Try to follow Python conventions as > much as possible. > > startsWith => startswith > endsWith => endswith Perhaps not so surprising, but I don't agree on this. Since we are working with JavaScript here,

[mochikit] Re: Introducing the MochiKit.Text module

2008-12-18 Thread Christoph Zwerschke
Amit Mendapara schrieb: > Again, I'm too, agree with Arner. Try to follow Python conventions as > much as possible. > > startsWith => startswith > endsWith => endswith By the way, one (new) useful feature of Python's startswith is that you can also pass a tuple of substrings (prefixes) inst

[mochikit] Re: Introducing the MochiKit.Text module

2008-12-18 Thread Arnar Birgisson
Hi Christoph, On Thu, Dec 18, 2008 at 13:00, Christoph Zwerschke 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 f