Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #94930 > unrolled thread

how to determine for using c extension or not ?

Started byHideyuki YASUDA <umedoblock@gmail.com>
First post2015-08-03 21:44 +0900
Last post2015-08-03 21:44 +0900
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  how to determine for using c extension or not ? Hideyuki YASUDA <umedoblock@gmail.com> - 2015-08-03 21:44 +0900

#94930 — how to determine for using c extension or not ?

FromHideyuki YASUDA <umedoblock@gmail.com>
Date2015-08-03 21:44 +0900
Subjecthow to determine for using c extension or not ?
Message-ID<mailman.1181.1438605885.3674.python-list@python.org>
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 ?

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web