mirror of https://github.com/pyodide/pyodide.git
Merge pull request #134 from thatneat/patch-1
`square` -> `cube` to avoid aliasing
This commit is contained in:
commit
d43c6dcb43
|
@ -162,16 +162,16 @@ Likewise, you can use Javascript objects from Python.
|
||||||
|
|
||||||
%% js
|
%% js
|
||||||
// javascript
|
// javascript
|
||||||
function square(x) {
|
function cube(x) {
|
||||||
return x*x;
|
return x*x*x;
|
||||||
}
|
}
|
||||||
|
|
||||||
%% md
|
%% md
|
||||||
To call this function from Python...
|
To call this function from Python...
|
||||||
|
|
||||||
%% code {"language":"py"}
|
%% code {"language":"py"}
|
||||||
from js import square
|
from js import cube
|
||||||
square(4)
|
cube(4)
|
||||||
|
|
||||||
%% md
|
%% md
|
||||||
## Exceptions
|
## Exceptions
|
||||||
|
|
Loading…
Reference in New Issue