From 8c83cfa7f885d63bc617f6589a3f8ff1d4460ac4 Mon Sep 17 00:00:00 2001 From: thatneat Date: Sat, 1 Sep 2018 07:09:54 -0700 Subject: [PATCH] `square` -> `cube` to avoid aliasing This makes for a clearer & more convincing demo since `square` was already defined on the Python side. --- src/python.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python.html b/src/python.html index 31bc5b0b9..cf58601a6 100644 --- a/src/python.html +++ b/src/python.html @@ -162,16 +162,16 @@ Likewise, you can use Javascript objects from Python. %% js // javascript -function square(x) { - return x*x; +function cube(x) { + return x*x*x; } %% md To call this function from Python... %% code {"language":"py"} -from js import square -square(4) +from js import cube +cube(4) %% md ## Exceptions