[Python-3000] AST access (WAS: Adaptation vs. Generic Functions)

Talin talin at acm.org
Tue Apr 11 05:41:18 CEST 2006


Greg Ewing <greg.ewing <at> canterbury.ac.nz> writes:

> Perhaps you'd like to lend your support to PEP 335, then?-)
> 
>    http://www.python.org/dev/peps/pep-0335/

I think that would give me *most* of what I would need for my
solver. What remains is a consise way to specify bound vs. unbound
variables I would prefer not to have to restrict people to using
a limited set of pre-declared undefined variables, i.e. X, Y, Z, etc.;
plus I would want to be able to associate additional constraints
with those unbound variables.

At the risk of violating Guido's prohibition against 'wild ideas' --
it seems to me that a lot could be done by reserving a special
operator - say '?' - that has no built-in semantics. Thus, people
who wanted to create alternative notations, expressed in Python
code, could use this 'user operator' to attach any language specific
metadata to terms of the expression.

Just a thought, not to be taken too seriously...

-- Talin




More information about the Python-3000 mailing list