On 12 January 2017 at 15:34, Victor Stinner <victor.stin...@gmail.com> wrote:
> 2017-01-12 13:13 GMT+01:00 Stephan Houben <stephan...@gmail.com>:
>> Something like:
>> from __syntax__ import decimal_literal
>
> IMHO you can already implement that with a third party library, see for 
> example:
> https://github.com/lihaoyi/macropy
>
> It also reminds me my PEP 511 which would open the gate for any kind
> of Python preprocessor :-)
> https://www.python.org/dev/peps/pep-0511/

PEP 302 (import hooks) pretty much did that years ago :-) Just write
your own processor to translate a new filetype into bytecode, and
register it as an import hook. There was a web framework that did that
for templates not long after PEP 302 got implemented (can't recall the
name any more).

Paul
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to