Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1a.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.05; 'plenty': 0.07; 'derived': 0.09; 'integers': 0.09; 'objects.': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'sake': 0.09; 'subclass': 0.09; 'subclasses': 0.09; 'python': 0.11; 'subject:python': 0.14; 'argument': 0.15; '"python': 0.16; 'containers': 0.16; 'count.': 0.16; 'dictionaries': 0.16; 'googling': 0.16; 'int"': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'subject:class': 0.16; 'subject:object': 0.16; 'subject:type': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'pointed': 0.18; 'accepting': 0.18; 'examples': 0.18; 'language': 0.19; '>>>': 0.20; 'meant': 0.22; 'int,': 0.22; 'lawrence': 0.22; 'tuples': 0.22; '2015': 0.23; 'header:In-Reply- To:1': 0.24; 'properties': 0.24; 'header:User-Agent:1': 0.26; 'header:X-Complaints-To:1': 0.26; 'define': 0.27; 'object,': 0.27; "doesn't": 0.28; "i'm": 0.29; 'objects': 0.29; 'sense': 0.29; 'extend': 0.31; 'anybody': 0.32; 'language.': 0.32; 'class': 0.33; 'definition': 0.34; 'lists': 0.34; 'to:addr:python-list': 0.35; 'something': 0.35; 'really': 0.35; 'there': 0.36; '(and': 0.36; 'should': 0.37; 'subject:: ': 0.37; 'tue,': 0.38; 'received:org': 0.38; 'end': 0.39; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'sure': 0.40; 'mark': 0.40; 'even': 0.61; 'interest': 0.64; 'our': 0.64; 'charset:windows-1252': 0.65; '>>>>>': 0.66; 'url:26': 0.66; 'dr.': 0.69; 'subject.': 0.72; 'url:v': 0.72; 'url:youtube': 0.72; 'url:2011': 0.75; 'url:watch': 0.78; 'url:wordpress': 0.79; 'demonstrates': 0.84; 'pythonistas,': 0.84; 'sorry.': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Mark Lawrence Subject: Re: Everything is an object in python - object class and type class Date: Tue, 02 Jun 2015 22:47:16 +0100 References: <14976c1b-a620-426f-b529-41a3c04e9c1a@googlegroups.com> <48fc36e9-fa67-45d5-9864-0921b7e819ce@googlegroups.com> <556d931a$0$12991$c3e8da3$5496439d@news.astraweb.com> <556de143$0$13009$c3e8da3$5496439d@news.astraweb.com> <%9mbx.608935$JH2.445461@fx11.am4> <914115ea-0f93-4929-b325-5b3f78f5d9f1@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: host-92-24-217-14.ppp.as43234.net User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.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: 40 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433281652 news.xs4all.nl 2843 [2001:888:2000:d::a6]:60007 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91905 On 02/06/2015 20:50, Ian Kelly wrote: > On Tue, Jun 2, 2015 at 1:31 PM, Jon Ribbens > wrote: >> On 2015-06-02, Dr. Bigcock wrote: >>> On Tuesday, June 2, 2015 at 1:49:03 PM UTC-5, Jon Ribbens wrote: >>>> On 2015-06-02, Dr. Bigcock wrote: >>>>> It doesn't really do anything. No one uses integers as objects. >>>>> (Any dissenters?) >>>> >>>> Yes. *Everyone* uses integers as objects. Containers such as >>>> lists and dictionaries and tuples etc contain objects. If >>>> integers weren't objects then you wouldn't be able to put them >>>> in containers (and you'd end up with Java). >>> >>> Sorry. I meant "object" in the sense of OOP: something you might >>> extend or make a derived class with. >> >> I'm not sure you get to define which properties of objects you want >> not to count. > > Accepting for the sake of argument that "something to be subclassed" > is a reasonable definition of object, it should be pointed out that > anybody who works with bools in Python is using integers as objects. > > The "Super Considered Harmful" essay also has a couple of examples of > subclasses of int, and even just googling "python subclass int" > demonstrates that there is plenty of interest in the subject. > The classic response to "Super Considered Harmful" for those who may be interested is https://rhettinger.wordpress.com/2011/05/26/super-considered-super/ and recently https://www.youtube.com/watch?v=EiOglTERPEo -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for our language. Mark Lawrence