4 ms·
Link to console demo from that page is broken, sadly. edit: looks like if you remove "_en" then you get to the right place, http://www.brython.info/tests/conso
by azakai 13y ago
Link to console demo from that page is broken, sadly.
edit: looks like if you remove "_en" then you get to the right place, http://www.brython.info/tests/console.html http://www.brython.info/tests/console.html
Looks like pyjs, in that it has python syntax but JavaScript semantics, for example numbers turn into doubles here (but should be arbitrary-precision ints in Python).
- e12e 13y agoWell, python 2.7: >>> a = 1/3 >>> type(a) int python 3.2 >>> a = 1/3 >>> type(a) <class 'float'> brython: print(type(1/3)) <class 'float'>
- azakai 13y agoCorrect, that's a python 2/3 difference. But both 2 and 2 have arbitrary precision integers AFAIK, try this code x = 1 for i in range(100): x = x*2 print(i, x)
- e12e 13y agoIndeed. Just to verify that it's not just a difference in (string)representation, something like: print(9**32-(9**32-5)) Also works (brython returns 0, python2&3 return 5)