Is there any theoretical reason that stops this? As far as I know python modules can be written in C? What's the reason you can't call functions written in python 2 in python 3?
In some cases you could, if the code was in pure Python and written to tbe compatible with both Python 2 and Python 3.
In many cases you can't, because they're different languages, so code written for one isn't necessarily valid code in the other.
Python is interpreted, not compiled, so the actual source code has to be run whenever you use the module. There is nothing that corresponds to the compiled form of Java. If the source code of your Python module doesn't work with the new Python, then your module will not work.
(There is a bytecode compiled form of Python, but unlike the Java VM it is not a stable, specified target, so the bytecode interpreter might change from one version of Python to another just like the language might. See this question on Programmers StackExchange.)
I don't understand how the issue of C modules is related here. Python modules written in C have to be recompiled even for different versions of Python 2.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With