Re: how to format a python source file with tools?

2009-11-30 Thread gil_johnson
On Nov 27, 9:58 am, Diez B. Roggisch de...@nospam.web.de wrote: [...] so i would like to have a tool to intelligently format the code for me and make the code more beautiful and automated. This is not possible. Consider the following situation: [...] Both are semantically radically

Re: A terminators' club for clp

2009-11-16 Thread gil_johnson
On Nov 14, 12:08 pm, r rt8...@gmail.com wrote: On Nov 14, 7:28 am, gil_johnson x7-g5w...@earthlink.net wrote: Actually there is a rank this post (gotta be careful with that verbage!) AND a report this post as spam. Of course it only exists in GG's and not Usenet. I *do* know that the star

Re: A terminators' club for clp

2009-11-14 Thread gil_johnson
On Nov 13, 5:29 pm, kj no.em...@please.post wrote: [...] Or it could be set up so that at least n 1 delete votes and no keep votes are required to get something nixed.  Etc. This seems simpler than all-out moderation. (all-out moderation? now, there's an oxymoron for ya!) How about using

Re: Most efficient way to pre-grow a list?

2009-11-10 Thread gil_johnson
On Nov 9, 10:56 pm, Gabriel Genellina wrote: [much cutting] def method3a():    newArray = array.array('I', [INITIAL_VALUE]) * SIZE    assert len(newArray)==SIZE    assert newArray[SIZE-1]==INITIAL_VALUE [more cutting] So arrays are faster than lists, and in both cases one_item*N

Re: Most efficient way to pre-grow a list?

2009-11-08 Thread gil_johnson
On Nov 6, 8:46 pm, gil_johnson gil_john...@earthlink.net wrote: I don't have the code with me, but for huge arrays, I have used something like: arr[0] = initializer for i in range N:      arr.extend(arr) This doubles the array every time through the loop, and you can add the powers