Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!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.011 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'interpreter': 0.05; 'represents': 0.05; 'algorithms,': 0.07; 'derived': 0.09; 'integers': 0.09; 'operand': 0.09; 'python': 0.11; 'language,': 0.12; 'complaining': 0.16; 'dict': 0.16; 'dig': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'handling,': 0.16; 'janssen': 0.16; 'one-element': 0.16; 'personally,': 0.16; 'subject:object': 0.16; 'sure.': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'example.': 0.24; 'integer': 0.24; 'interpret': 0.24; 'lets': 0.24; 'of.': 0.24; 'equivalent': 0.26; 'world,': 0.26; 'header:In-Reply-To:1': 0.27; 'on,': 0.29; 'am,': 0.29; "doesn't": 0.30; '(like': 0.30; 'newer': 0.30; 'sets': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'concern': 0.31; 'implicit': 0.31; 'piece': 0.31; 'class': 0.32; 'subject:the': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'ordered': 0.36; 'doing': 0.36; 'two': 0.37; 'level': 0.37; 'generic': 0.38; 'to:addr:python-list': 0.38; 'anything': 0.39; 'itself': 0.39; 'structure': 0.39; 'to:addr:python.org': 0.39; 'life,': 0.60; 'simply': 0.61; "you're": 0.61; 'first': 0.61; 'information': 0.63; 'talking': 0.65; 'details': 0.65; '26,': 0.68; 'combining': 0.68; 'theoretical': 0.74; 'power': 0.76; 'collision': 0.84; 'factors,': 0.84; 'tie': 0.84; '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=swMESa2XMoAiTY9lYAVENtEmF9XlekWO7Df99AiWnqM=; b=Jwh7bl3lMr0RDoLyC7ooRBJhMxaMLRnH7Zm2B59YPDwezo/BweXi/eao3kkTFvc8op mp6TNeQSUn0PaQFxS3TMgYzTgBKWGEi6iivJ1u7emshjEpVVI/6T4MXYZMbFz7xa6dAT pPDZ1XVj+8bW3es7g7QOelhdt6WgW2Uud89W4n6a48PipLhzP4eW/VY784PvkwTEU7P1 bj5XjJxla1ECSfjpCUFLVQWzyPK6jEJsLkxdZZt5uqUr41TOyKspDVSQ7po/sX7SC8x4 IgY8k6a/X/zYZtLPyJJGOV+2d9NUPIQcO1AMr2H/fLgE0gJ779Rc6jFiwUvnj/AEjAR1 b2Jw== MIME-Version: 1.0 X-Received: by 10.220.48.17 with SMTP id p17mr610966vcf.97.1372201069339; Tue, 25 Jun 2013 15:57:49 -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: Wed, 26 Jun 2013 08:57:49 +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: 1372201071 news.xs4all.nl 15969 [2001:888:2000:d::a6]:60375 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:49206 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? > That's a lot of power derived simply from using generic data > structures, not some panzy generic meta-Object that doesn't do > anything but tie people to an implicit type-theology. Sure. And if you want assembly language, you know where to find it. Personally, I don't want to have to code the fundamentals of data structures in Python - that's C's job. The details of hashing algorithms, fill factors, collision handling, and so on, are the concern of the dict implementation, and unless there's a good reason to dig into it (like when I'm explaining to my boss about a hash-collision attack and why it means we have to upgrade to a newer interpreter version), I don't care about the minutiae. What you're doing is actually in the same theological / theoretical level as what you're complaining of. It's equivalent to pointing out that every single data structure you use, and every piece of information in this world, can be represented with an aggregation of the digits 1 and 0 - that's an awesomely powerful, clean, and all-encompassing abstraction, but in day-to-day life, we really don't need to think about it. ChrisA