On Fri, 22 Apr 2016 12:12 am, Chris Angelico wrote:
> On Fri, Apr 22, 2016 at 12:01 AM, Oscar Benjamin
> wrote:
>> In the recursive stack overflow case what you'll usually have is
>>
>> 1) A few frames leading up to the start of recursion
>> 2) A long repetitive sequence of frames
>> 3) A few fra
On Fri, Apr 22, 2016 at 12:30 AM, Oscar Benjamin
wrote:
> On 21 April 2016 at 15:12, Chris Angelico wrote:
>> On Fri, Apr 22, 2016 at 12:01 AM, Oscar Benjamin
>> wrote:
>>> In the recursive stack overflow case what you'll usually have is
>>>
>>> 1) A few frames leading up to the start of recursi
On 21 April 2016 at 15:12, Chris Angelico wrote:
> On Fri, Apr 22, 2016 at 12:01 AM, Oscar Benjamin
> wrote:
>> In the recursive stack overflow case what you'll usually have is
>>
>> 1) A few frames leading up to the start of recursion
>> 2) A long repetitive sequence of frames
>> 3) A few frames
On Fri, Apr 22, 2016 at 12:01 AM, Oscar Benjamin
wrote:
> In the recursive stack overflow case what you'll usually have is
>
> 1) A few frames leading up to the start of recursion
> 2) A long repetitive sequence of frames
> 3) A few frames at the end showing how the exception was ultimately trigge
On 21 April 2016 at 13:15, Steven D'Aprano wrote:
> On Thu, 21 Apr 2016 06:53 pm, Oscar Benjamin wrote:
>
>> On 21 April 2016 at 04:07, Steven D'Aprano wrote:
>>> I want to group repeated items in a sequence. For example, I can group
>>> repeated sequences of a single item at a time using groupby
On Thu, 21 Apr 2016 06:53 pm, Oscar Benjamin wrote:
> On 21 April 2016 at 04:07, Steven D'Aprano wrote:
>> I want to group repeated items in a sequence. For example, I can group
>> repeated sequences of a single item at a time using groupby:
>>
>>
>> from itertools import groupby
>> for key, grou
On Thu, 21 Apr 2016 18:05:40 +1000, Steven D'Aprano wrote:
> The specific problem I am trying to solve is that I have a sequence of
> strings (in this case, error messages from a Python traceback) and I'm
> looking for repeated groups that may indicate mutually recursive calls. E.g.
> suppose I
On 21.04.16 06:07, Steven D'Aprano wrote:
Now I want to group subsequences. For example, I have:
"ABCABCABCDEABCDEFABCABCABCB"
and I want to group it into repeating subsequences.
[...]
How can I do this? Does this problem have a standard name and/or solution?
This is a part of lossless da
On 21 April 2016 at 04:07, Steven D'Aprano wrote:
> I want to group repeated items in a sequence. For example, I can group
> repeated sequences of a single item at a time using groupby:
>
>
> from itertools import groupby
> for key, group in groupby("BBCDDEEE"):
> group = list(group)
>
On Thursday 21 April 2016 16:35, Michael Selik wrote:
> On Wed, Apr 20, 2016 at 11:11 PM Steven D'Aprano
> wrote:
>
>> I want to group [repeated] subsequences. For example, I have:
>> "ABCABCABCDEABCDEFABCABCABCB"
>> and I want to group it into repeating subsequences. I can see two
>> ways... Ho
Steven D'Aprano writes:
> I want to group repeated items in a sequence. For example, I can group
> repeated sequences of a single item at a time using groupby:
[...]
> Now I want to group subsequences. For example, I have:
>
> "ABCABCABCDEABCDEFABCABCABCB"
>
> and I want to group it into repeatin
On Thu, Apr 21, 2016 at 2:55 AM Vlastimil Brom
wrote:
> 2016-04-21 5:07 GMT+02:00 Steven D'Aprano :
> > I want to group subsequences.
> > "ABCABCABCDEABCDEFABCABCABCB"
> > ABC ABC ABCDE ABCDE F ABC ABC ABC B
> > or:
> > ABC ABC ABC D E A B C D E F ABC ABC ABC B
>
> if I am not missing something,
2016-04-21 5:07 GMT+02:00 Steven D'Aprano :
> I want to group repeated items in a sequence. For example, I can group
> repeated sequences of a single item at a time using groupby:
>
>
> from itertools import groupby
> for key, group in groupby("BBCDDEEE"):
> group = list(group)
> pr
On Thu, Apr 21, 2016 at 2:35 AM Michael Selik
wrote:
> On Wed, Apr 20, 2016 at 11:11 PM Steven D'Aprano
> wrote:
>
>> I want to group [repeated] subsequences. For example, I have:
>> "ABCABCABCDEABCDEFABCABCABCB"
>> and I want to group it into repeating subsequences. I can see two
>> ways... How
On Wed, Apr 20, 2016 at 11:11 PM Steven D'Aprano
wrote:
> I want to group [repeated] subsequences. For example, I have:
> "ABCABCABCDEABCDEFABCABCABCB"
> and I want to group it into repeating subsequences. I can see two
> ways... How can I do this? Does this problem have a standard name and/or
>
On Thu, Apr 21, 2016 at 1:07 PM, Steven D'Aprano wrote:
> Now I want to group subsequences. For example, I have:
>
> "ABCABCABCDEABCDEFABCABCABCB"
>
> and I want to group it into repeating subsequences. I can see two ways to
> group it:
>
> ABC ABC ABCDE ABCDE F ABC ABC ABC B
>
> or:
>
> ABC ABC A
On 04/20/2016 08:57 PM, Ethan Furman wrote:
> [snip same pattern as Steven wrote]
Nevermind. It's obviously time for me to go to bed. :/
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list
On 04/20/2016 08:07 PM, Steven D'Aprano wrote:
Now I want to group subsequences. For example, I have:
"ABCABCABCDEABCDEFABCABCABCB"
and I want to group it into repeating subsequences. I can see two ways to
group it:
ABC ABC ABCDE ABCDE F ABC ABC ABC B
giving counts:
(ABC) count = 2
(ABCDE)
I want to group repeated items in a sequence. For example, I can group
repeated sequences of a single item at a time using groupby:
from itertools import groupby
for key, group in groupby("BBCDDEEE"):
group = list(group)
print(key, "count =", len(group))
outputs:
A count = 4
B
19 matches
Mail list logo