all pairs of items in a list without indexing?

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


Alex Martelli <aleaxit <at> yahoo.com> writes:
> 
> Steven Bethard <steven.bethard <at> gmail.com> 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.  ;)

Steve




More information about the Python-list mailing list