On 12 January 2017 at 15:34, Victor Stinner <victor.stinner at gmail.com> wrote:
> 2017-01-12 13:13 GMT+01:00 Stephan Houben <stephanh42 at 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