Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: Everything is an object in python - object class and type class Date: Wed, 03 Jun 2015 15:08:51 +0300 Organization: A noiseless patient Spider Lines: 35 Message-ID: <87fv6956zw.fsf@elektro.pacujo.net> References: <14976c1b-a620-426f-b529-41a3c04e9c1a@googlegroups.com> <48fc36e9-fa67-45d5-9864-0921b7e819ce@googlegroups.com> <556d931a$0$12991$c3e8da3$5496439d@news.astraweb.com> <1ad44d0f-8a98-4302-9391-51264aa258e5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="6719"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18q9RxsHzT4VX1y70qR1VKR" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:JRNAPbAsu28b02A0uvMro2Vy6Lw= sha1:o2c2t6n7zm/V8z+3KJjMJx+wM9U= Xref: csiph.com comp.lang.python:91946 BartC : > To 'variable' and 'type', you might need to add 'value' to make it more > complete. 'Value' and 'object' are indeed synonymous as long as you keep in mind that: >>> -12 == -12 True >>> -12 is -12 False IOW, the literal expression -12 happens to construct a fresh value/object each time CPython parses it. > You might call such a value an 'object'. The trouble is, Python also > uses 'object' to mean the base class of all classes. 'object' is the class of all objects just like 'int' is the class of all integers. So no trouble at all. > And it seems to use it in a more abstract sense as well to mean pretty > much everything. While other languages, such as C, use object in yet > another way. > > Which is where the term breaks down as it no longer helps in > understanding. It's become meaningless. Correct! Abstractions are generalizations of specifics. You can't understand the generalizations before being bored with the specifics first. Marko