Path: csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed4.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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'represents': 0.05; 'integers': 0.09; 'operand': 0.09; 'yeah,': 0.09; 'python': 0.11; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'janssen': 0.16; 'one-element': 0.16; 'pairs:': 0.16; 'subject:object': 0.16; 'unordered': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'implementing': 0.19; 'thu,': 0.19; 'seems': 0.21; '>>>': 0.22; 'example.': 0.24; 'integer': 0.24; 'interpret': 0.24; 'lets': 0.24; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'am,': 0.29; 'sets': 0.30; 'message-id:@mail.gmail.com': 0.30; 'easier': 0.31; 'url:wiki': 0.31; 'container': 0.31; 'url:wikipedia': 0.31; 'class': 0.32; 'computer.': 0.33; 'actual': 0.34; 'subject:the': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'ordered': 0.36; 'doing': 0.36; 'url:org': 0.36; 'two': 0.37; 'implement': 0.38; 'to:addr:python-list': 0.38; 'itself': 0.39; 'to:addr:python.org': 0.39; 'course.': 0.60; 'first': 0.61; 'talking': 0.65; '26,': 0.68; 'combining': 0.68; 'obvious': 0.74; 'divided': 0.91; '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:date:message-id:subject:from:to :content-type; bh=5V9Px/WCtezOSgByktSwWWZsaQml6Psk7xkTfeAe5hA=; b=nCsi5RSbcQ9zajM+cDuSyX1BRPgZmYe8Z4LXaDY0UxLla4T6AWW7nyTLwoabBOzVMI +ltiYRyZxawvzhPPsjk09+GlANfS0fwEG1HLCJz5fh9NJcpKAHffJFSL9ogPS0D5Lbas Io0XZH7V0wtezFG35ixYyNZizEogXSpQc8gbISwIGbZ16u7kYOakGafnyHfALtLtLvub Cc+4/tUiuSDSHBNpsZfpKuE4Bx3ut9kE4W1Us7L1A2ztrhWhuUMMdB9ny/Mvawbp2X/C mT1b/Jf0VBxw+MEWfOlmMywwYc0kNLQeMJSyZhRbq3D0D/GvMLI1mPhgoPXaRcpVweG/ lvFA== MIME-Version: 1.0 X-Received: by 10.59.9.69 with SMTP id dq5mr1759410ved.87.1372260219895; Wed, 26 Jun 2013 08:23:39 -0700 (PDT) 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> Date: Thu, 27 Jun 2013 01:23:39 +1000 Subject: Re: What is the semantics meaning of 'object'? From: Chris Angelico To: python-list@python.org 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1372260228 news.xs4all.nl 15934 [2001:888:2000:d::a6]:42741 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49265 On Thu, Jun 27, 2013 at 1:16 AM, Rotwang wrote: > On 25/06/2013 23:57, Chris Angelico wrote: >> >> On Wed, Jun 26, 2013 at 8:38 AM, Mark Janssen >> wrote: >>> >>> Combining integers with sets I can make >>> a Rational class and have infinite-precision arithmetic, for example. >> >> >> Combining two integers lets you make a Rational. Python integers are >> >> already infinite-precision. Or are you actually talking of using >> "machine words" and sets as your fundamental? Also, you need an >> >> ordered set - is the set {5,3} greater or less than the set {2} when >> you interpret them as rationals? One must assume, I suppose, that any >> >> one-element set represents the integer 1, because any number divided >> by itself is 1. Is the first operand 3/5 or 5/3? > > > You could use Kuratowski ordered pairs: > > http://en.wikipedia.org/wiki/Ordered_pair#Kuratowski_definition > > Not that doing so would be sensible, of course. I don't know much about > low-level data structures but it seems obvious that it's much easier to > implement an ordered container type than an unordered set on a computer. Yeah, I don't think Mark is much concerned about implementing things on actual computers, somehow :) ChrisA