Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.02; 'python.': 0.04; 'subject:Python': 0.05; 'attribute': 0.07; 'behave': 0.07; 'function,': 0.07; 'pypy': 0.07; 'suggesting': 0.07; 'subject:ideas': 0.09; 'cc:addr:python-list': 0.15; '(ideally': 0.16; 'scope.': 0.16; 'space:': 0.16; 'subject: \n ': 0.16; 'symbolic': 0.16; 'subject:] ': 0.16; 'wrote:': 0.16; 'jan': 0.19; 'maybe': 0.21; '(or': 0.22; 'header:In-Reply-To:1': 0.22; 'objects,': 0.23; 'originally': 0.24; 'url:doc': 0.25; 'pm,': 0.26; 'function': 0.27; 'looks': 0.27; "i'm": 0.27; 'bit': 0.28; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.29; 'outer': 0.30; 'received:209.85.210.46': 0.30; 'received:mail- pz0-f46.google.com': 0.30; 'robust': 0.30; 'solved': 0.30; 'usable': 0.30; "i've": 0.31; 'values': 0.32; 'thu,': 0.32; 'objects': 0.32; 'object': 0.33; 'calling': 0.34; 'cc:2**1': 0.36; 'passed': 0.37; 'received:google.com': 0.37; 'could': 0.37; 'received:209.85': 0.38; 'should': 0.38; 'url:en': 0.39; 'url:org': 0.39; 'point': 0.39; 'subject:from': 0.39; 'subject: (': 0.39; 'received:209': 0.39; 'subject:: ': 0.39; 'issues': 0.40; 'believe': 0.65; 'want,': 0.71; 'access,': 0.74; 'nathan': 0.84; 'circuit': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=X3726XQdWxEeQ6OtwgNypwPuUmSFjS9dyySGUROg5QE=; b=x7qq6XbabhXmrCnnZ1sSWR5YQLeG2IEv8dvHCeUnaa5L+ybZRxnwVy7VSxCkuVPjrF q+0AkeVtoC1P7zJ8shb6ASnVkqP3EpxsYTb88JNtG7olO/yd4K53ZmbD++jpR9mHKYC5 j9vRS6RV9BCcpLEqlY++qTQlf1ny91ar1IJh4= MIME-Version: 1.0 In-Reply-To: References: From: Devin Jeanpierre Date: Fri, 13 Jan 2012 08:45:38 -0500 Subject: Re: [Python-ideas] Symbolic expressions (or: partials and closures from the inside out) To: Nathan Rice Content-Type: text/plain; charset=UTF-8 Cc: python-list , python-ideas X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1326462383 news.xs4all.nl 6880 [2001:888:2000:d::a6]:53046 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:18916 On Thu, Jan 12, 2012 at 3:45 PM, Nathan Rice wrote: > I'm interested in fixing both issues. I believe both issues I've had > could be solved by having a robust "symbolic object". These objects > would basically usable like ordinary objects, however upon any > attribute access or other form of interaction, the object would > basically short circuit the calling function, and return a symbolic > object directly to the outer scope. The symbolic object would behave > like a generator function frozen at the point of attribute access, and > upon send()-ing (or whatever method), it would behave exactly as if > the values sent had been the ones passed in originally (ideally > without consuming the generator). I find the way you've formalized this a bit "weird". It looks like you're suggesting adding laziness to Python. If that's what you want, maybe you should try PyPy and the thunk object space: http://doc.pypy.org/en/latest/objspace-proxies.html#the-thunk-object-space -- Devin