> On Sep 21, 2018, at 06:53, Stefan Behnel <stefan...@behnel.de> wrote:
> 
> Totally. This might actually be more relevant for Cython than for CPython
> in the end, because it wouldn't be limited to the stdlib and its core modules.
> 
> It's a bit more difficult for us, because this probably won't work easily
> across Python releases (2.[67] and 3.[45678] for now) and also definitely
> not for PyPy, but that just means some multiplication of the generated
> code, and we have the dynamic part of it already. Supporting that for
> Unicode strings will be fun, I'm sure. :)

I’m glad to hear that this might be relevant to Cython.
I believe it should be straightforward to parametrize the code generator to 
generate code targeted
at specific cPython versions. While we originally targeted 3.6, Larry Hastings 
managed to quickly port it to 3.8.
The two changes in cPython’s data structures between 3.6 and 3.8 that needed 
changes to the
code-gen were [1] from 3.7 and [2] from 3.8. And internally, I’ve still got a 
task open to back-port this to support 2.7.

-- Jeethu

[1]: https://bugs.python.org/issue18896
[2]: https://bugs.python.org/issue33597
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to