[Python-3000] Proposal: Metasyntax operator

Ivan Krstic krstic at solarsail.hcs.harvard.edu
Tue Jul 25 16:15:52 CEST 2006


Guido van Rossum wrote:
> I'd like to see this fall under the blanket "Python will not have
> programmable syntax" rule in PEO 3099.

Why?

I understand your general position, but categorically rejecting anything
smelling of metasyntax seems ill-conceived to me. Python already has
just enough programmable bits in place to invite abuse which emulates
programmable syntax; look at SQLObject or SQLalchemy for examples. And
the former is a very high-profile module.

This is akin to Zope's incredibly messy 'implements' hack (walk up the
stack, inject a factory metaclass which does base class resolution on
the fly), which is completely obviated by the introduction of class
decorators. Class decorators are not a feature that many of us consider
obviously-needed or beautiful, but the code that's out there
demonstrates a need for it. The same is the case with (explicit!) AST
literals of some kind.

-- 
Ivan Krstic <krstic at solarsail.hcs.harvard.edu> | GPG: 0x147C722D


More information about the Python-3000 mailing list