Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.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; 'plenty': 0.07; 'derived': 0.09; 'integers': 0.09; 'objects.': 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; '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; '>>>': 0.20; 'meant': 0.22; 'int,': 0.22; 'tuples': 0.22; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'properties': 0.24; 'define': 0.27; 'object,': 0.27; 'message-id:@mail.gmail.com': 0.28; "doesn't": 0.28; "i'm": 0.29; 'objects': 0.29; 'sense': 0.29; 'extend': 0.31; 'anybody': 0.32; 'class': 0.33; 'definition': 0.34; 'received:google.com': 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; 'end': 0.39; 'pm,': 0.39; 'to:addr:python.org': 0.39; 'sure': 0.40; 'even': 0.61; 'interest': 0.64; 'dr.': 0.69; 'subject.': 0.72; 'demonstrates': 0.84; 'to:name:python': 0.84; 'sorry.': 0.91 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ZEs46AobWvu60SGECp/lplpnQNvp5i4vHDtuV3GSGJQ=; b=Il0SSYHoct93jbazy6G+neAES7soS0rSE5DHojB12zj9R16vukE+6oPifHaFVASI9v GNKZoUV6F5cRDKOVYTCeHvKL/9i+msusRrzv3MNHAkeMjDlKGrR8MkJ52rTxODOoAaFG 9ndxOmS6VWcov4T3i1/vGTRtbYHJQZoj7mMtARKKimoGARsBlBjS2Mptc17Qj3akYyzw qIgQowFK23TYwEo5vxv/1LXbUCBFrD4N77Kulw+lHkWchWts+LsRbebaqJnwHR0okS/G 2vozws5Fk1dHpw7TUh4tEFkaP031s1xj6SvR4JaatVQ7vHhJ6uZjOXz6+jkjUpuZ4KO8 ijCQ== X-Received: by 10.42.85.207 with SMTP id r15mr36370206icl.94.1433274652448; Tue, 02 Jun 2015 12:50:52 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: 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> From: Ian Kelly Date: Tue, 2 Jun 2015 13:50:11 -0600 Subject: Re: Everything is an object in python - object class and type class To: Python Content-Type: text/plain; charset=UTF-8 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: 26 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433274654 news.xs4all.nl 2963 [2001:888:2000:d::a6]:36455 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91888 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.