[Python-ideas] Non-boolean return from __contains__
pyideas at rebertia.com
Wed Jul 28 03:56:14 CEST 2010
On Tue, Jul 27, 2010 at 6:43 PM, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
> One of the things I would
> like to get from a code-as-ast feature is a natural way
> of embedding sub-expressions that *do* get evaluated
> according to the normal Python rules. For example,
> one should be able to write something like
> cust = "SMITH"
> date = today()
> sales = select(transactions,
> @ast: customer_code == cust and transaction_date == date)
> and have it possible for the implementation of select()
> to easily and safely evaluate 'cust' and 'date' in the
> calling environment.
In other words, you want (possibly an implicit form of) the comma
operator from Scheme's quasiquote.
Maybe Paul Graham /was/ onto something.
More information about the Python-ideas