4 ms·
But does it retain the python semantics? for example: def fac(n): if n == 0 : return 1 else: return n * fac(n-1) print fac
by toolslive 11y ago
But does it retain the python semantics?
for example:
def fac(n):
if n == 0 :
return 1
else:
return n * fac(n-1)
print fac(100)
will yield a big string, while any naive C++ translation will print the string "0" due to overflow.
- e12e 11y agoGood question (and I don't know the answer, as I'm not familiar with this project). Note that a naive c++ translation will also error out on simply i=2 * * 524. Automatic extension/promotion of numbers is pretty fundamental to python.