Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.036 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'class,': 0.07; 'builtin': 0.09; 'defines': 0.09; 'python': 0.11; 'creates': 0.14; 'expecting': 0.16; 'subclass': 0.16; 'wrote:': 0.18; 'basically': 0.19; 'equivalent': 0.26; 'pass': 0.26; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; '>>>>': 0.31; 'class': 0.32; 'something': 0.35; 'received:google.com': 0.35; 'wrong': 0.37; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'new': 0.61; 'different': 0.65; "'3'": 0.84; '2015': 0.84; 'str.': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=PxMvaaN+DI+YnlXPmxVe+83G0y1oKNArkcz5n1eNmNI=; b=GB9OdUtRThX8LNqFZdST3YvpQaJz5UgpSj7bVgRWt3CfF19ChjibwWuJxo7jnrBKug KV34XsYdB1jI/0ajMRG04OxopraTzS8WiAkZ0OYR1ek9TxC/engTzuJYGFpuoCdvWUCY eaJEsw+WnqW72z6EzYe+p7o9MZcECrhGdPNAj+HzI1p7hUkDKhA4JgfzAhQOysm5niGo EqDOdJV0iZkIxi6nE9E4ukw0RPifMoBFktzjR2cbPQXz8xOltkOZIzQXSRJQeY4ka374 x0oNF5r5x2jxbF6IPBAqoEVs+QPJONnfYd+dKGFGHH+mRqTwWliRPSKaB3S0OQSgNtHr 1HtQ== X-Received: by 10.107.12.158 with SMTP id 30mr8197091iom.61.1431276218283; Sun, 10 May 2015 09:43:38 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Ian Kelly Date: Sun, 10 May 2015 10:42:58 -0600 Subject: Re: anomaly To: Python Content-Type: text/plain; charset=UTF-8 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: 16 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431276220 news.xs4all.nl 2953 [2001:888:2000:d::a6]:56821 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90297 On Sun, May 10, 2015 at 10:34 AM, Mark Rosenblitt-Janssen wrote: > Here's something that might be wrong in Python (tried on v2.7): > >>>> class int(str): pass This defines a new class named "int" that is a subclass of str. It has no relation to the builtin class int. >>>> int(3) > '3' This creates an instance of the above "int" class, which is basically equivalent to calling "str(3)". Were you expecting a different result?