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!newsfeed2.news.xs4all.nl!xs4all!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python.': 0.02; 'from:addr:yahoo.co.uk': 0.04; 'class,': 0.07; 'builtin': 0.09; 'defines': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'creates': 0.14; 'language.': 0.14; 'behave': 0.16; 'expecting': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subclass': 0.16; 'language': 0.16; 'wrote:': 0.18; 'basically': 0.19; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'equivalent': 0.26; 'pass': 0.26; 'header:X-Complaints-To:1': 0.27; 'header:In- Reply-To:1': 0.27; 'am,': 0.29; 'class': 0.32; 'languages': 0.32; 'something': 0.35; 'keyword': 0.36; 'wrong': 0.37; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'ian': 0.60; 'new': 0.61; 'our': 0.64; 'different': 0.65; 'charset:windows-1252': 0.65; 'here': 0.66; 'news': 0.67; "'3'": 0.84; '2015': 0.84; 'does?': 0.84; 'str.': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: anomaly Date: Sun, 10 May 2015 18:21:42 +0100 References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-78-147-178-82.as13285.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 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: , Newsgroups: comp.lang.python Message-ID: Lines: 32 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1431278514 news.xs4all.nl 2880 [2001:888:2000:d::a6]:41840 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90301 On 10/05/2015 17:48, Rustom Mody wrote: > On Sunday, May 10, 2015 at 10:14:36 PM UTC+5:30, Ian wrote: >> 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? > > In C (family) languages int is a keyword > From that pov this is completely bizarre > This is a news group for a language called Python. Why do people keep coming here expecting it to behave in the same way that (say) CORAL 66/250 does? -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence