all pairs of items in a list without indexing?

Steven Bethard steven.bethard at
Wed Sep 29 18:21:21 CEST 2004

Alex Martelli <aleaxit <at>> writes:
> Steven Bethard <steven.bethard <at>> wrote:
> > 
> > but that seems like a lot of wasteful list slicing...
> Sorry, I don't get it: what's wasteful about it?

Sorry, perhaps I should have said it has a bad smell.  I wasn't the only one 
who thought this smelled a little bad; quoting Jeff:

"Something about taking a slice of seq for the inner loop doesn't seem right 
to me."

Maybe we need to retrain our noses.  ;)


More information about the Python-list mailing list