Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Random832 Newsgroups: comp.lang.python Subject: Re: When is an int not an int? Who can explain this? Date: Mon, 18 Jan 2016 12:02:30 -0500 Lines: 12 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de 3z8IVqzv9enNAfIwJ9o07g949hIzoW6Lu3nAyU8Egokw== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'imply': 0.07; 'int.': 0.09; 'received:internal': 0.09; 'repr': 0.09; 'subclass': 0.09; 'assume': 0.11; 'jan': 0.11; 'subject:not': 0.11; "hasn't": 0.15; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:io': 0.16; 'received:messagingengine.com': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'tried': 0.24; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'module': 0.25; '(which': 0.26; 'chris': 0.26; 'callable': 0.29; 'itself,': 0.29; 'though,': 0.32; 'curious': 0.33; "he's": 0.33; 'int': 0.33; 'instance': 0.35; 'but': 0.36; 'should': 0.36; 'to:addr:python-list': 0.36; 'subject:?': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'received:66': 0.38; 'anything': 0.38; 'to:addr:python.org': 0.40; 'information,': 0.61; 'header:Message-Id:1': 0.61; 'more': 0.63; 'results': 0.66; 'subject:When': 0.84; 'subject:this': 0.85; 'armed': 0.91; 'subject:Who': 0.91 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=BINXBiCk/7//TBQ3y36VTT2IW/0=; b=czUZDe 4EML337KOkvbeSYPWh3yJRLuVu6daF9pg21UTzjPBoThGCBe3/LavfXMZjo8pnOW SMCBvQzuLrxL5vwMV0iJ4llSGDgAD5xxsFs9hOHmOW2vOpS+RFrvvzBIQbrA1LpE w5ayPSZCBPAlsGub+GIMM8Awf6BjA9yg+kw70= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=BINXBiCk/7//TBQ 3y36VTT2IW/0=; b=CU0obuZTuv2+NkQ5f+WxJou6ryX4VldNsA+idDbDrYzx9Nj eyf53vlEn2YVdUiq9oShzY4htXcHPxsuFwa/h4eThlPSlBsczi7V4BmqeRWwZUeR 9z5yCCxtbj+ruARApyc1H3cAzFRu7SAPbhPdoacS3LvgDOM0SU5CtB8OrLMw= X-Sasl-Enc: hi2qiHgLwlubxUbKQ2UX0SsyJ6DTLTeqSaIzFEwbahfI 1453136550 X-Mailer: MessagingEngine.com Webmail Interface - ajax-6cda141f In-Reply-To: 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: , Xref: csiph.com comp.lang.python:101882 On Mon, Jan 18, 2016, at 11:51, Chris Angelico wrote: > Armed with that information, you should be able to track down what's > going on. It's curious, though, that you have a callable subclass of > module bound to the name int. Very curious indeed. He hasn't tried calling it. And there's no reason to assume it is a subclass. The results he's shown imply that the object bound to the name int is an instance of a type named module* (which is almost certainly, but not definitely, the usual module type itself, and no more likely to be a subclass of it than of anything else.) *Strictly speaking, a type whose repr is ""