Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #43085

Re: How to do a Lispy-esque read?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.kamp.net!newsfeed.kamp.net!newsfeed.freenet.ag!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <arnodel@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.032
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'suppose': 0.07; '[1,': 0.09; 'subject:How': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'url:html)': 0.16; 'ignore': 0.16; 'wrote:': 0.18; 'input': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'header:In- Reply-To:1': 0.27; 'received:209.85.217': 0.29; 'url:code': 0.29; 'message-id:@mail.gmail.com': 0.30; 'url:python': 0.33; 'comment': 0.34; 'received:209.85': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'url:org': 0.36; 'should': 0.36; 'example,': 0.37; 'received:209': 0.37; 'url:library': 0.38; 'obtain': 0.39; 'how': 0.40; 'read': 0.60; 'to:addr:gmail.com': 0.65; 'subject:read': 0.84; '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=sLQZLveO8qXn14Ic/ToNYZgBP8UetYIQUbHab1XgEuY=; b=giaDrAcE4OBdmRnxu+YQs6P/HLrzLwpYDXe+0comsZlNLwzoRRThvPyKW9u+Oy4+73 XcMvfTUX2cH5D5lqNxoNX6j+gSPJsVn+ClVVoNgoju8g6P3xOI9KMeVwevy8Jah62/71 eWnuDLzaIDLOzIdyw953kZnor7jWVFN+vk7zRdS7G/ogAv8t2bSaLGcs0dXEY7+LheMJ T2G1SihMePBs1NfybyZEyRos5PTfAcM2qA5X7ugpqZI+kzcshcBbdd6cRoAFvAmHM0yi GaFzd8/igql015oYzQ+V/idLkzo8SDDzxrrUmxP1eJwxecpWq8PLCG5+RnMXl3cNEwuT YeaA==
MIME-Version 1.0
X-Received by 10.112.76.39 with SMTP id h7mr10671824lbw.118.1365443182733; Mon, 08 Apr 2013 10:46:22 -0700 (PDT)
In-Reply-To <4ff75708-f8e4-4ec9-8a4b-e71eb1dc2892@googlegroups.com>
References <4ff75708-f8e4-4ec9-8a4b-e71eb1dc2892@googlegroups.com>
Date Mon, 8 Apr 2013 18:46:22 +0100
Subject Re: How to do a Lispy-esque read?
From Arnaud Delobelle <arnodel@gmail.com>
To zeta.convex@gmail.com
Content-Type text/plain; charset=UTF-8
Cc Python <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 <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.298.1365443184.3114.python-list@python.org> (permalink)
Lines 15
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1365443184 news.xs4all.nl 6885 [2001:888:2000:d::a6]:40025
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:43085

Show key headers only | View raw


On 8 April 2013 08:45,  <zeta.convex@gmail.com> wrote:
> Suppose I want to read an object from some stream. How do I do it?
>
> For example, if the input stream contained the text:
> [1, # python should ignore this comment
> 2]
>
> and I do a "read" on it, I should obtain the result
> [1, 2]

You might be interested in code.compile_command()
(http://docs.python.org/2/library/code.html)

-- 
Arnaud

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

How to do a Lispy-esque read? zeta.convex@gmail.com - 2013-04-08 00:45 -0700
  Re: How to do a Lispy-esque read? Barrett Lewis <musikal.fusion@gmail.com> - 2013-04-08 01:17 -0700
  Re: How to do a Lispy-esque read? Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-04-08 01:32 -0700
  Re: How to do a Lispy-esque read? Arnaud Delobelle <arnodel@gmail.com> - 2013-04-08 18:46 +0100

csiph-web