how to determine for using c extension or not ?

umedoblock umedoblock at gmail.com
Mon Aug 3 08:40:49 EDT 2015


Hello everyone.

I use bisect module.
bisect module developer give us c extension as _bisect.

If Python3.3 use _bisect, _bisect override his functions in bisect.py.

now, I use id() function to determine for using c extension or not.

>>> >>> import bisect
>>> >>> id(bisect.bisect)
139679893708880
>>> >>> import _bisect
>>> >>> id(_bisect.bisect)
139679893708880

they return 139679893708880 as id.
so i believe that i use c extension.

My check is correct ? right ?
or you have more good idea ?



More information about the Python-list mailing list