Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed2.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.003 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; '16,': 0.03; 'assign': 0.07; 'class,': 0.07; 'inherited': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; '"internal': 0.16; '(note': 0.16; 'calculus,': 0.16; 'invalid.': 0.16; 'lambda': 0.16; 'pov.': 0.16; 'prides': 0.16; 'subject: \n ': 0.16; 'subject:OOP': 0.16; 'subject:object': 0.16; 'subject:possible': 0.16; 'subject:programming': 0.16; 'subject:type': 0.16; 'such,': 0.16; 'typeerror:': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'unlike': 0.19; 'machine': 0.22; 'cc:addr:python.org': 0.22; 'mind.': 0.24; 'java': 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '15,': 0.26; 'subject:/': 0.26; 'header:In- Reply-To:1': 0.27; 'idea': 0.28; 'point': 0.28; 'function': 0.29; 'chris': 0.29; 'am,': 0.29; "doesn't": 0.30; 'message- id:@mail.gmail.com': 0.30; "i'm": 0.30; '"",': 0.31; 'anyone': 0.31; 'file': 0.32; 'class': 0.32; '(most': 0.33; "i'd": 0.34; 'classes': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'acceptable': 0.36; 'fact': 0.38; 'pm,': 0.38; 'anything': 0.39; 'recent': 0.39; 'itself': 0.39; 'sure': 0.39; 'how': 0.40; "you're": 0.61; 'subject:The': 0.64; 'selling': 0.65; 'to:addr:gmail.com': 0.65; 'world': 0.66; 'theoretical': 0.74; 'actually,': 0.84; 'bare': 0.84; 'valid,': 0.84; 'washington': 0.93; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=0WalPFeqNovRfXAzGjm7b1xT5zHUxxXBFEoeHXcubh4=; b=NvY1uvJq8gR0aQHTZSIRn8vcwtGlPRmI6b0CylP5n2CL643woJffSHx+0Ujl6gdIaR S8EAgptO4ORJKyF+CVmd3BkGQh1CyowXM2+xG5RsdfSYgXX/b9QMF+GwDVmdiw5blzPa 2d2jcqRsO584skR2dbaM279/tsyFmieY9opoQa9pcwNLxZ6JpyMmnDMIyc+ff+fHKMGn sg9IWosaDvXS/9FivgdM7tnGpvT7sBqGjNuNya+6ME6pLI2yRrui9qcYJCfoBdByTxzh rffBFHz3vX5M2mJsblg2brsxXF1xf2KbpNi4EIDplhlTCQjc9SJhvsy53kr1M/ZC7nNX 61Vw== MIME-Version: 1.0 X-Received: by 10.180.104.197 with SMTP id gg5mr10427733wib.13.1366151910159; Tue, 16 Apr 2013 15:38:30 -0700 (PDT) In-Reply-To: References: <516bd241$0$29872$c3e8da3$5496439d@news.astraweb.com> <516C3C44.6010706@rece.vub.ac.be> Date: Tue, 16 Apr 2013 15:38:29 -0700 Subject: Re: The type/object distinction and possible synthesis of OOP and imperative programming languages From: Mark Janssen To: Chris Angelico Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org 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: 28 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1366151912 news.xs4all.nl 2636 [2001:888:2000:d::a6]:34436 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:43710 On Mon, Apr 15, 2013 at 3:32 PM, Chris Angelico wrote: > On Tue, Apr 16, 2013 at 8:12 AM, Rotwang wrote: >> Traceback (most recent call last): >> File "", line 1, in >> class C(type(lambda: None)): >> TypeError: type 'function' is not an acceptable base type >> >> >> and I don't think that FunctionType would be considered an "internal >> detail", would it? Not that I'd cite the fact that not all types can be >> inherited from as evidence that types and classes are not synonyms, mind. > > Actually, I'm not sure how you'd go about inheriting from a function. > Why not just create a bare class, then assign its __call__ to be the > function you're inheriting from? I think his point remains valid, from a theoretical pov. Python prides itself on the idea of "first-class functions" and such, but unlike the world of lambda calculus, this selling point is a bit invalid. Because for Python (and any C-based language), it is roots squarely in the Turing machine and its real-word implementation. (Note this contrasts starkly with Java(script), which doesn't seem to be based on anything -- can anyone clarify where Java actually comes from?) -- MarkJ Tacoma, Washington