What are some strategies to write python code that works in CPython, Jython and IronPython

前端 未结 6 1917
忘了有多久
忘了有多久 2021-02-02 14:55

Having tries to target two of these environments at the same time I can safely say the if you have to use a database etc. you end up having to write unique code for that environ

6条回答
  •  孤街浪徒
    2021-02-02 15:26

    The #1 thing IMO: Focus on thread safety. CPython's GIL makes writing threadsafe code easy because only one thread can access the interpreter at a time. IronPython and Jython are a little less hand-holding though.

提交回复
热议问题