Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.albasani.net!weretis.net!feeder4.news.weretis.net!feeder2.ecngs.de!ecngs!feeder.ecngs.de!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; 'python,': 0.02; 'attributes': 0.07; 'instantiated': 0.09; 'lookup': 0.09; 'received:internal': 0.09; 'repr': 0.09; 'itself.': 0.11; 'syntax': 0.13; 'subject:python': 0.14; 'languages,': 0.15; 'anymore': 0.16; 'equivalents': 0.16; 'languages)': 0.16; 'magic': 0.16; 'message-id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:10.202.2.212': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:66.111.4.27': 0.16; 'received:messagingengine.com': 0.16; 'received:out3-smtp.messagingengine.com': 0.16; 'subject:class': 0.16; 'subject:object': 0.16; 'subject:type': 0.16; 'wrote:': 0.16; 'compare': 0.20; '(or': 0.21; 'parameter': 0.22; 'pass': 0.22; 'header:In-Reply-To:1': 0.24; 'mon,': 0.24; 'module.': 0.27; 'dictionary': 0.29; 'itself,': 0.29; 'str': 0.29; 'function': 0.30; 'certain': 0.31; "can't": 0.32; 'to:addr:python-list': 0.35; 'something': 0.35; "isn't": 0.35; 'received:10': 0.37; 'subject:: ': 0.37; 'received:66': 0.38; 'building': 0.38; 'things': 0.39; 'to:addr:python.org': 0.39; 'why': 0.40; 'some': 0.40; 'from:no real name:2**0': 0.61; 'header:Message-Id:1': 0.62; 'else.': 0.66; 'special': 0.72 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; 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=Fn9Iovwl4yjpeYChjairqKmcPJI=; b=q6+eeG lIGKIxQU9sum+F1ZOuwyetgBvBCchBKD0D2zFiIYozug7uXjY/gTVO1Dvmamx2ZU Tt+3/GVFM4M7CiCHvuLYUUFal1svCN6YfBKn8O7nk0whc3xqxL/SWgV1h5bHz/ap qF++uw6sujz08T82gAgbgpzYzB14mhL/cRX1U= 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=Fn9Iovwl4yjpeYC hjairqKmcPJI=; b=QIvrJ4ze2BDXECqURCAoxYaZGb6e5R9zmR038oyn1XdA412 jIsI0vh0pnBNotz4o3lBR0J1GGvU3tJNlnVs+tdvBIi02Wy3avlM00Najrc3D/WX OKCDzjzyvMYcUlUXLY8hIxdJFFNf6j+pzInhs1A9AyrV3fisGUSPvxeclfH0= X-Sasl-Enc: YI9pq6TFaqpg/Mckv3pCrel3zBLkt5BbyePdigJDfple 1433218131 From: random832@fastmail.us To: python-list@python.org MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain X-Mailer: MessagingEngine.com Webmail Interface - ajax-073992ec In-Reply-To: References: <14976c1b-a620-426f-b529-41a3c04e9c1a@googlegroups.com> <7f287dcf-8d52-4ab8-9768-88d1f75da269@googlegroups.com> Subject: Re: Everything is an object in python - object class and type class Date: Tue, 02 Jun 2015 00:08:51 -0400 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: 18 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433218133 news.xs4all.nl 2837 [2001:888:2000:d::a6]:52046 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91781 On Mon, Jun 1, 2015, at 20:24, TheDoctor wrote: > A type is not an object in the same way an instantiated type is an object > -- anymore than a blueprint for a building is the building itself. What is an object? It's something you can call str or repr on. It's something you can lookup attributes from its internal dictionary and call methods on. It's something you can compare whether it's == to something else. It's something you can pass as a parameter to a function In many languages, you can't do any of these things (or their equivalents for those languages) to a type. In others, you have to get a special "class object" that isn't _really_ the same thing as the type itself, via some special syntax like typeof(Foo) or Foo.class, and can only work with it through magic methods in a certain module. In python, you can. Why is this bad or confusing?