Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed3a.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'true,': 0.04; 'defines': 0.07; 'type,': 0.07; 'object)': 0.09; 'subclass': 0.09; 'cc:addr :python-list': 0.10; 'python': 0.11; '2.7': 0.13; 'subject:python': 0.14; 'beating': 0.16; 'chris,': 0.16; 'define.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'integers.': 0.16; "isn't.": 0.16; 'object),': 0.16; 'similarly,': 0.16; 'subject:class': 0.16; 'subject:object': 0.16; 'subject:type': 0.16; 'wrote:': 0.16; 'language': 0.19; '>>>': 0.20; '(not': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'trying': 0.22; 'saying': 0.22; 'object.': 0.22; 'am,': 0.23; '2015': 0.23; 'this:': 0.23; 'header:In-Reply-To:1': 0.24; 'checking': 0.27; 'community.': 0.27; 'define': 0.27; 'object,': 0.27; 'message-id:@mail.gmail.com': 0.28; "doesn't": 0.28; 'rest': 0.28; "i'm": 0.29; 'screen.': 0.29; 'certain': 0.31; 'code': 0.31; 'language.': 0.32; 'everyone': 0.34; 'received:google.com': 0.34; 'could': 0.35; 'instance': 0.35; 'something': 0.35; "isn't": 0.35; 'but': 0.36; 'so,': 0.37; 'subject:: ': 0.37; 'one,': 0.37; 'tue,': 0.38; 'does': 0.39; 'your': 0.60; 'even': 0.61; 'claim': 0.61; 'is.': 0.63; 'therefore': 0.65; 'chrisa': 0.84; 'clearer': 0.84; 'to:none': 0.90 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=1Eklyiro+qA5F2qPzc8XjyJ5FnMUuMPsTloBUPNeMc0=; b=qjthB4XAOtETX9ZofKqzt3FdXBUkeifzrEIIEhE/3XJRbY10dTIgKdBE8QBMrg2Xb8 8u0V7V1ob0YeQ6wrYgP0N0DoDVHrZiiVX0MZteUSKQ56l/VJrzKD+rwac8Lv5q8sKB3L wHcAQ+CsH6Y/JeFL9j6j1YO31vCGk+by7R1v8dKf/ik5tZ81ieUUe7MauHDgtQdP2cmB SYPrlszAIf95q+lWbJvPaAt27jiLwpxUNKMM1EiKkgfSMXUyfnP0tyZYba49vGbfDCwH +1EGB3aC05S6ByJ9BJdJDek73iL0s7oAC9GuRhg6zsnkE4tOdxtlfHRnclgYDmXfSCto 2Opg== MIME-Version: 1.0 X-Received: by 10.50.143.104 with SMTP id sd8mr4706371igb.14.1433208634265; Mon, 01 Jun 2015 18:30:34 -0700 (PDT) In-Reply-To: References: <14976c1b-a620-426f-b529-41a3c04e9c1a@googlegroups.com> <7f287dcf-8d52-4ab8-9768-88d1f75da269@googlegroups.com> Date: Tue, 2 Jun 2015 11:30:34 +1000 Subject: Re: Everything is an object in python - object class and type class From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433208637 news.xs4all.nl 2879 [2001:888:2000:d::a6]:53950 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91759 On Tue, Jun 2, 2015 at 11:15 AM, TheDoctor wrot= e: > Let me make this clearer to you, Chris, because I don't want you to have = to suck it too, like the rest of this community. > > A type is not an object. You see it as one, because you are MENTALLY lex= ing your own code on the screen. But python does not define a type. It de= fines certain primitives, like strings and integers. But it doesn't define= what an OBJECT is. So you and everyone else are beating around the bush t= rying to define something that the LANGUAGE ITSELF doesn't define. So, don= 't make a claim about it. > > In Python 2.7 type(type) is type (not object), but isinstance(type, objec= t) is true -- so it is ambiguous, even contradictory, in the language. > I'm not saying this for dreamingforward's benefit, as he clearly isn't interested in learning, but in case the OP is confused: Checking the type of something doesn't tell you what it isn't. The isinstance check is true, because type is an instance of type, which is a subclass of object, therefore type is an instance of object. Similarly, you could check this: >>> issubclass(type, object) True So you can see that a type IS an object. ChrisA