On Tuesday, 2 October 2012 22:13:20 UTC+5:30, Mark Lawrence wrote:
> On 02/10/2012 17:12, Ramchandra Apte wrote:
>
> > On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote:
>
> >> On 01/10/2012 01:58, 8 Dihedral wrote:
>
> >>
>
> >>>
>
> >>
>
> >>> Your question seems vague
Steven D'Aprano於 2012年10月3日星期三UTC+8上午9時24分13秒寫道:
> On Tue, 02 Oct 2012 18:11:20 -0700, 8 Dihedral wrote:
>
>
>
> > Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道:
>
>
>
> >> Oh, I'm convinced that it's a bot.
>
> >> The fact that Dihedral never responds to conversations about him/it is
On Tue, 02 Oct 2012 18:11:20 -0700, 8 Dihedral wrote:
> Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道:
>> Oh, I'm convinced that it's a bot.
>> The fact that Dihedral never responds to conversations about him/it is
>> a give away: nearly all people are far to egotistical to let
>> accusatio
Steven D'Aprano於 2012年10月3日星期三UTC+8上午8時57分20秒寫道:
> On Wed, 03 Oct 2012 03:58:02 +1000, Chris Angelico wrote:
>
>
>
> > Dihedral might be a bot and might not. I've come to the conclusion that
>
> > it's not worth trying to find out, given that a good bot can outdo a lot
>
> > of humans in usefu
On Monday, October 1, 2012 4:17:50 PM UTC+8, Mark Lawrence wrote:
> On 01/10/2012 01:58, 8 Dihedral wrote:
>
> >
>
> > Your question seems vague to me. If you know you are storing
>
> > only immutable tuples in a list, then the way to iterate is simple.
>
> >
>
>
>
> Does Python have a m
On 10/2/2012 1:58 PM, Chris Angelico wrote:
On Wed, Oct 3, 2012 at 2:44 AM, Mark Lawrence wrote:
What happened to freedom of speech? If I want to talk to a bot, I'll talk
to a bot. Besides I'm not convinced it/he/she is a bot. Plus if you read
my post carefully, add in several years experien
On 02/10/2012 18:58, Chris Angelico wrote:
Dihedral might be a bot and might not. I've come to the conclusion
that it's not worth trying to find out, given that a good bot can
outdo a lot of humans in useful conversation.
ChrisA
Try telling that to the newbies on the Python tutor mailing lis
On Wed, Oct 3, 2012 at 2:44 AM, Mark Lawrence wrote:
> What happened to freedom of speech? If I want to talk to a bot, I'll talk
> to a bot. Besides I'm not convinced it/he/she is a bot. Plus if you read
> my post carefully, add in several years experience of Python the language
> and Python th
On 02/10/2012 17:12, Ramchandra Apte wrote:
On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote:
On 01/10/2012 01:58, 8 Dihedral wrote:
Your question seems vague to me. If you know you are storing
only immutable tuples in a list, then the way to iterate is simple.
On Monday, 1 October 2012 13:47:50 UTC+5:30, Mark Lawrence wrote:
> On 01/10/2012 01:58, 8 Dihedral wrote:
>
> >
>
> > Your question seems vague to me. If you know you are storing
>
> > only immutable tuples in a list, then the way to iterate is simple.
>
> >
>
>
>
> Does Python have a
On 1 October 2012 09:19, Mark Lawrence wrote:
> On 01/10/2012 01:58, 8 Dihedral wrote:
>
>>
>> Your question seems vague to me. If you know you are storing
>> only immutable tuples in a list, then the way to iterate is simple.
>>
>>
> Does Python have a magic method that let's me use mutable
On 01/10/2012 01:58, 8 Dihedral wrote:
Your question seems vague to me. If you know you are storing
only immutable tuples in a list, then the way to iterate is simple.
Does Python have a magic method that let's me use mutable tuples? I'd
also like immutable lists. Is it worth raising a
On Sunday, September 30, 2012 12:15:57 AM UTC+8, Thomas Bach wrote:
> Hi,
>
>
>
> say we have the following:
>
>
>
> >>> data = [('foo', 1), ('foo', 2), ('bar', 3), ('bar', 2)]
>
>
>
> is there a way to code a function iter_in_blocks such that
>
>
>
> >>> result = [ list(block) for bloc
On Sat, Sep 29, 2012 at 09:26:00AM -0700, Paul Rubin wrote:
> Thomas Bach writes:
>
> itertools.groupby(data, lambda (x,y) : x)
>
> is basically what you want.
True!
Thanks,
Thomas Bach
--
http://mail.python.org/mailman/listinfo/python-list
On Sat, Sep 29, 2012 at 10:14 AM, Thomas Bach
wrote:
> Hi,
>
> say we have the following:
>
data = [('foo', 1), ('foo', 2), ('bar', 3), ('bar', 2)]
>
> is there a way to code a function iter_in_blocks such that
>
result = [ list(block) for block in iter_in_blocks(data) ]
>
> evaluates to
Thomas Bach writes:
result = [ [('foo', 1), ('foo', 2)], [('bar', 3), ('bar', 2)] ]
> by _only_ _iterating_ over the list (caching all the elements sharing
> the same first element doesn't count)?
itertools.groupby(data, lambda (x,y) : x)
is basically what you want.
--
http://mail.python.o
16 matches
Mail list logo