[Patches] [ python-Patches-864863 ] Bisect C implementation

SourceForge.net noreply at sourceforge.net
Mon Jan 5 05:13:48 EST 2004


Patches item #864863, was opened at 2003-12-23 03:28
Message generated for change (Comment added) made by rhettinger
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=864863&group_id=5470

Category: Library (Lib)
Group: Python 2.4
>Status: Closed
>Resolution: Accepted
Priority: 5
Submitted By: Dmitry Vasiliev (hdima)
Assigned to: Raymond Hettinger (rhettinger)
Summary: Bisect C implementation

Initial Comment:
Bisect C implementation.

----------------------------------------------------------------------

>Comment By: Raymond Hettinger (rhettinger)
Date: 2004-01-05 05:13

Message:
Logged In: YES 
user_id=80475

Thanks for the patch.

----------------------------------------------------------------------

Comment By: Dmitry Vasiliev (hdima)
Date: 2003-12-29 03:18

Message:
Logged In: YES 
user_id=388573

> One idea is to rename it to _bisect and then conditionally
> import it into bisect.py.  That would preserve the teaching
> value of the existing module while providing a good speed-up
> for users working with sorted data.

Maybe just do 'from _bisect import *' while preserve old
code as comment or doc string?

> Since this module has been around for a long time, it is
likely
> that there have been many uncoventential uses.  So, it is
> important to make sure a replacement can handle all of the
> same types of input (any container object defining __len__(),
> __getitem__(), and insert(); and member objects defining
> __lt__()).

I've made new test case for custom container object.

One new idea I have is full slice semantic for lo and hi
arguments.

----------------------------------------------------------------------

Comment By: Raymond Hettinger (rhettinger)
Date: 2003-12-26 11:55

Message:
Logged In: YES 
user_id=80475

I'll take a look at this in a few days.

One idea is to rename it to _bisect and then conditionally 
import it into bisect.py.  That would preserve the teaching 
value of the existing module while providing a good speed-up 
for users working with sorted data.

Since this module has been around for a long time, it is likely 
that there have been many uncoventential uses.  So, it is 
important to make sure a replacement can handle all of the 
same types of input (any container object defining __len__(), 
__getitem__(), and insert(); and member objects defining 
__lt__()).

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=864863&group_id=5470



More information about the Patches mailing list