The most exciting non-standard Python in my opinion is Pyodide, but it still uses C. MicroPython and CircuitPython have a signifiicant user base. RustPython is being developed too. Are Jupyter, IPython and Sagemath implementations, or just different packages?
Anyway, I’ve worked with Iron Python a lot for a Rhino/Grasshopper plug-in.
The main differences between Pythons beyond CPython, are the lack of C-extensions, e.g. Numpy etc. and lack of modern syntax (even if you only use the non-obsolete Python from those you mention, PyPy (Boost::Python is a library, not a Python), only Python 3.10 syntax is supported).
It’s definitely possible to write implementation independent code by keeping it high level and minimising dependencies, and only using pure Python libraries, e.g. PyCryptodome over Cryptography, and foregoing modern bells and whistles like match
. This is less work than writing Python 2/3 compatible code in my opinion.
It’s unusual for there to be a problem with simple code, especially well written PEP8 compliant Python code, but there are definitely differences in the realm of implementation details.
For example, the most devious bug I ever fixed was causing corrupted Shapefile headers in Iron Python, because the old calling application used del to call a .close()
and write the header, instead of using a context manager. That was actually no problem at all in CPython, but the Garbage Collector in Iron Python is not predictable. In particular, the Iron gc did not run before the rest of the Shapefile was written, so essential meta data was never written to the header, and the default weird byte string was readable as a valid integer for the shape type field. Luckily it was -13 million or so, and not a value between 0 and 14, or I may have never figured it out.
If the caller had only written clean, modern, PEP8 code (or even if they’d just used a context manager over del), there would’ve been no problem at all.