why not bisect options?
Raymond Hettinger
python at rcn.com
Fri Feb 29 14:15:17 EST 2008
More information about the Python-list mailing list
Fri Feb 29 14:15:17 EST 2008
- Previous message (by thread): why not bisect options?
- Next message (by thread): why not bisect options?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Robert Bossy] > I thought it would be useful if insort and consorts* could accept the > same options than list.sort, especially key and cmp. If you're going to do many insertions or searches, wouldn't it be *much* more efficient to store your keys in a separate array? The sort() function guarantees that it calls the key function exactly once for each member of the list. With and bisect/insort, successive searches can call the key function over and over again with the same value. Raymond
- Previous message (by thread): why not bisect options?
- Next message (by thread): why not bisect options?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list