Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.019 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'override': 0.07; 'extension.': 0.09; 'subject:using': 0.09; 'subject:not': 0.11; 'bisect': 0.16; 'received:192.168.11': 0.16; '>>>': 0.20; 'developer': 0.20; 'extension': 0.20; 'import': 0.24; 'module': 0.25; 'header:User-Agent:1': 0.26; 'not.': 0.27; 'subject: ?': 0.27; 'module.': 0.27; 'correct': 0.28; 'function': 0.28; 'idea': 0.28; 'everyone.': 0.33; 'message-id:@gmail.com': 0.34; 'received:google.com': 0.35; 'to:addr:python-list': 0.36; 'received:192': 0.39; 'to:addr:python.org': 0.40; 'determine': 0.61; 'charset:iso-2022-jp': 0.63; 'more': 0.63; 'believe': 0.66 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=nsPCJEPRCf3e0Pgc8/fArswlLHE5fmN16fNOpWTR7Vc=; b=Mw3Ogn6ApbhTWJC8RW7bXojeEw+r4vP4PbkMARpGjkeJXhrn3zB8d/0iXvQBJmx9AD En1aN4NMTubRS+Q5WgJiWzw7NBlq4JUJVfaFYgBeq2Tg+T93kAqk3dOq0pIgVQNYgxVT 0Z4QJKrtDjMl5Php5kmiOQpoX6+xi/c8+Mwmysz9rwxo8+pW7kP0CUfhqi5vLNSaVwcn IsgGjJ97vHJK8lD2Bq6YLaR7Fh5I9YEQVOqEokjtYOYAri51DSmWT0WELQl7qO1Fqj4q PSmYOeZ1V4a6Rf84io0q9xSinO1Zw83ztXmgJoBU1CGodVj2L4st8EeoKwTKXIy+nAe2 QukA== X-Received: by 10.66.102.71 with SMTP id fm7mr22865066pab.5.1438580859976; Sun, 02 Aug 2015 22:47:39 -0700 (PDT) Date: Mon, 03 Aug 2015 14:47:36 +0900 From: umedoblock User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: python-list@python.org Subject: how to determine for using c extension or not ? Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1438580869 news.xs4all.nl 2913 [2001:888:2000:d::a6]:52161 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94918 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 ?