Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!lightspeed.eweka.nl!lightspeed.eweka.nl!newsfeed.xs4all.nl!newsfeed3a.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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'python,': 0.02; 'subject:code': 0.07; 'string': 0.09; 'strings.': 0.09; 'python': 0.11; 'blocks': 0.16; 'blocks:': 0.16; 'variables,': 0.16; 'code.': 0.18; 'print': 0.22; 'tried': 0.27; 'programming.': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'code': 0.31; 'block,': 0.31; 'invoke': 0.31; 'probably': 0.32; 'open': 0.33; 'could': 0.34; 'received:google.com': 0.35; 'add': 0.35; 'skip:& 10': 0.38; 'generic': 0.38; 'to:addr:python-list': 0.38; 'skip:& 20': 0.39; 'aside': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'around.': 0.60; 'ambiguous': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=KBKpGmvhZNhoEtrKtDp4RkdwLh8D5oPQMMWpcLLpYgE=; b=B/Lr1WA1FY/HCFiE12J+1DAPEHFD2nZtEAx2nSeP5kWSSFqFqmwS6Y3f72ZW8yfzEJ 84jarXCa8wLSw/8nAFrcqN5ccSHU/FjO+UzejAfGJKWC2NUAkwONTjO39uhcrmP6zGwe eOICAeMByhNM/K1oQvBgGQI5ZdDe32IjHk0CNjYh9gAxLb5vF1QKFUcJ7EMPtK+5Y+Bv 2M4qKrgXD9z/Y0wXe38lsmBal2vZkt1uFJEFn+fOJ1YqKNmmSfX2eBi3nHEVFPMFm/Ti WwPXqrndijHijoBi8AuJvYdiDjv/JVcHtyo/sUerzgzi8yExqcA48Lm5MN5SYsB97G88 xLTA== MIME-Version: 1.0 X-Received: by 10.60.135.68 with SMTP id pq4mr12312530oeb.74.1430591421470; Sat, 02 May 2015 11:30:21 -0700 (PDT) Date: Sat, 2 May 2015 13:30:21 -0500 Subject: code blocks From: "Dr. John Q. Hacker" To: python-list@python.org Content-Type: multipart/alternative; boundary=047d7b417ff97ee0d205151d85cc X-Mailman-Approved-At: Sun, 03 May 2015 08:04:04 +0200 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 44 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430633046 news.xs4all.nl 2831 [2001:888:2000:d::a6]:56739 X-Complaints-To: abuse@xs4all.nl X-Received-Bytes: 4705 X-Received-Body-CRC: 4158315878 Xref: csiph.com comp.lang.python:89831 --047d7b417ff97ee0d205151d85cc Content-Type: text/plain; charset=UTF-8 Hello, I'm thinking how interesting it would be to add code blocks to Python, so that arbitrary strings of code can be passed around. It would open up some interesting possibilities for self-modifying code and generic programming. Since Python has already a plethora of ambiguous string designations, one of them could be set aside specificially for code blocks: """for i in n: print i""" For any variables, like "n", it would access the scope in which it was running. When you tried to print a triple-double-quoted code block, perhaps it could invoke the code. My suggestion would be to use triple double-quoted strings. You probably already know that Ruby has code blocks. zipher --047d7b417ff97ee0d205151d85cc Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello,

I'm = thinking how interesting it would be to add code blocks to Python, so that = arbitrary strings of code can be passed around.=C2=A0=C2=A0 It would open u= p some interesting possibilities for self-modifying code and generic progra= mming.

Since Python has already a plethora of ambiguous string= designations, one of them could be set aside specificially for code blocks= :

"""for i in n: print i"""
<= br>
For any variables, like "n", it would access the sc= ope in which it was running.=C2=A0 When you tried to print a triple-double-= quoted code block, perhaps it could invoke the code.

My suggestion would be to use triple double-quoted strings.=C2=A0
You probably already know that Ruby has code blocks.

zi= pher
--047d7b417ff97ee0d205151d85cc--