mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 04:30:24 +01:00
This optimises the case where a Python function is, for example, stored to a JavaScript attribute and then later retrieved from Python. The Python function no longer needs to be a proxy with double proxying needed for the call from Python -> JavaScript -> Python. Signed-off-by: Damien George <damien@micropython.org>
20 lines
258 B
Plaintext
20 lines
258 B
Plaintext
== JavaScript side ==
|
|
[Function (anonymous)]
|
|
3
|
|
[Function (anonymous)]
|
|
-1
|
|
== Python side ==
|
|
<class 'JsProxy'>
|
|
3
|
|
<class 'JsProxy'>
|
|
-1
|
|
<class 'function'>
|
|
6
|
|
<class 'function'>
|
|
3.0
|
|
== JavaScript side ==
|
|
[Function: obj] { _ref: 4 }
|
|
6
|
|
[Function: obj] { _ref: 3 }
|
|
3
|