Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'ideally': 0.04; '*not*': 0.07; 'attributes': 0.09; 'integers': 0.09; 'oh,': 0.09; 'python': 0.11; 'language.': 0.14; 'useful,': 0.14; 'arithmetic.': 0.16; 'belongs': 0.16; 'janssen': 0.16; 'mean,': 0.16; 'objects.': 0.16; 'subject:object': 0.16; 'tuple': 0.16; 'tuple.': 0.16; 'type)': 0.16; 'types,': 0.16; 'wrote:': 0.18; '(the': 0.22; 'machine': 0.22; 'example.': 0.24; 'fraction': 0.24; 'integer': 0.24; 'sort': 0.25; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'ideal': 0.29; "doesn't": 0.30; 'is?': 0.30; 'sets': 0.30; 'message- id:@mail.gmail.com': 0.30; '25,': 0.31; 'argue': 0.31; 'grouping': 0.31; 'sets.': 0.31; 'terms.': 0.31; 'class': 0.32; 'subject:the': 0.34; 'basic': 0.35; "can't": 0.35; 'classes': 0.35; 'common': 0.35; "who's": 0.35; 'but': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'method': 0.36; 'example,': 0.37; 'being': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'fact': 0.38; 'pm,': 0.38; 'does': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'skip:u 10': 0.60; 'ian': 0.60; 'most': 0.60; "you're": 0.61; 'skip:n 10': 0.64; 'anything.': 0.68; 'combining': 0.68; 'lowest': 0.74; 'atomic': 0.84; 'sets,': 0.84; '2013': 0.98 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=9+fEqbjhUuoVUx7UaWvvmJ6Lylbp4uoGm9N/f8cwC4M=; b=qLpIOwcD/wK3dV+O+DDwx/KM2CN2t9l39agV0gn8rtMe+J8fwPhjjnxgyfr9LID9aW u4/1jS8o+vDwrxsh1EokF5QVj4QECKvyKpWjE1FjuCzFQDgvPYYY9XFKkqGeXsFEq0eJ FQPEc0R3FBW0Vuh+YNy8W3zcE+662vyPR93JQDB3zufHD/f64u/B5y3AHnNjw2Zb6VhZ L7FP9ZtAPxvBjsxH7YOHXGRjeWq49Y067G5zPME9KJdhv3PumoEKycDyjJStYaoQr2Og cRvOcd1osaZ/2qjDq05QBTdv5Vr0wat2XhTjfPZyURZko71RBYEaM5SOckvvrgn7tb3a 7cSg== X-Received: by 10.66.27.172 with SMTP id u12mr1858468pag.209.1372201865360; Tue, 25 Jun 2013 16:11:05 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <15ba0011-bbf1-42f7-b3ea-1c1d4b70e56b@googlegroups.com> <51c66962$0$29999$c3e8da3$5496439d@news.astraweb.com> <20130623133546.GA2308@capricorn> <51c723b4$0$29999$c3e8da3$5496439d@news.astraweb.com> <51C74D6E.6030200@rece.vub.ac.be> From: Ian Kelly Date: Tue, 25 Jun 2013 17:10:25 -0600 Subject: Re: What is the semantics meaning of 'object'? To: Python Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 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: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372201874 news.xs4all.nl 15912 [2001:888:2000:d::a6]:42653 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49209 On Tue, Jun 25, 2013 at 5:07 PM, Ian Kelly wrote: > On Tue, Jun 25, 2013 at 4:38 PM, Mark Janssen wrote: >> The issue of classes cooperating isn't as big as it seems, because >> since you're working now from a useful, agreed-upon common base (the >> non-negotiable, but also non-arbitrary) machine types, you're now all >> (the python and ideally the *object* community) speaking the same >> language. Who's going to argue about integers (as the atomic type) >> and sets (as the most basic grouping type) being THE common set of >> bases for everything else? I mean, it doesn't get anymore ideal and >> pure than integers and sets. Combining integers with sets I can make >> a Rational class and have infinite-precision arithmetic, for example. > > I don't see how this solves anything. At some point you have to be > able to add methods and attributes to your objects. For example, your > Rational class is going to need some sort of "reduce" method to reduce > a Rational instance to lowest terms. That's not a method that belongs > on an integer or set type. If you can't add functionality, then all > you will ever have are integers and sets, and if you can add > functionality, then what difference does it make what your fundamental > base class is? Oh, and just in case you're not aware, Python already has a Fraction class that supports unlimited-precision arithmetic. It doesn't need to inherit from tuple to accomplish this, and in fact that would be a bad way to approach it, since a fraction is *not* a tuple.