Re: function to split strings and lists on predicate

2014-01-06 Thread Dave Angel
On Mon, 06 Jan 2014 06:48:11 +, Mark Lawrence wrote: I came across this over the weekend http://paddy3118.blogspot.co.uk/2013/10/unifying-pythons-string-and-lis t.html. I couldn't come up with a solution to the fsplit function that seemed in any way cleaner. What can our nest of avid

function to split strings and lists on predicate

2014-01-05 Thread Mark Lawrence
I came across this over the weekend http://paddy3118.blogspot.co.uk/2013/10/unifying-pythons-string-and-list.html. I couldn't come up with a solution to the fsplit function that seemed in any way cleaner. What can our nest of avid Pythonistas come up with? -- My fellow Pythonistas, ask not w

Re: Strings and Lists

2005-04-19 Thread Tom Longridge
Thank you all very much for your responses. It's especially reassuring to hear about other Python GA's as I have had some scepticism about Python's speed (or lack of it) being too big a problem for such an application. With regard to using numeric, arrays or integer lists -- I didn't mention that

Re: Strings and Lists

2005-04-18 Thread Donn Cave
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Tom Longridge) wrote: > My current Python project involves lots repeatating code blocks, > mainly centred around a binary string of data. It's a genetic > algorithm in which there are lots of strings (the chromosomes) which > get mixed, mutated a

Re: Strings and Lists

2005-04-18 Thread Peter Hansen
Tom Longridge wrote: My current Python project involves lots repeatating code blocks, mainly centred around a binary string of data. It's a genetic algorithm in which there are lots of strings (the chromosomes) which get mixed, mutated and compared a lot. Given Python's great list processing abilit

Re: Strings and Lists

2005-04-18 Thread Bill Mill
On 18 Apr 2005 04:42:17 -0700, Tom Longridge <[EMAIL PROTECTED]> wrote: > My current Python project involves lots repeatating code blocks, > mainly centred around a binary string of data. It's a genetic > algorithm in which there are lots of strings (the chromosomes) which > get mixed, mutated and

Re: Strings and Lists

2005-04-18 Thread Sidharth Kuruvila
Hi, I not sure what sorts of operations you plan to do. But if you intend to use fixed length arrays or even carrying out repetetive operations. You should probably look at numeric http://numeric.scipy.org/ On 18 Apr 2005 04:42:17 -0700, Tom Longridge <[EMAIL PROTECTED]> wrote: > My current Py

Re: Strings and Lists

2005-04-18 Thread [EMAIL PROTECTED]
Hello Tom, I think it is more efficient if we can use list (with True,False) member to do genetics algorithms. Of course a lot of works to do to change from string binary into boolean list. I do programming genetics algorithms in C# I guess I have to modify my program also because my old program

Strings and Lists

2005-04-18 Thread Tom Longridge
My current Python project involves lots repeatating code blocks, mainly centred around a binary string of data. It's a genetic algorithm in which there are lots of strings (the chromosomes) which get mixed, mutated and compared a lot. Given Python's great list processing abilities and the relative